Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export @trinsic/trinsic/browser properly #906

Merged
merged 3 commits into from
Aug 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

## Installation
```bash
npm install @trinsic/trinsic
npm install @trinsic/sdk
```

```ts
import {
TrinsicService
} from "@trinsic/trinsic";
} from "@trinsic/sdk";
```

For bundlers that do not use the `"browser"` field, you can directly import the required web package with:
```ts
import { AccountService} from "@trinsic/trinsic/lib/browser";
import { AccountService} from "@trinsic/sdk/browser";
````

## Documentation
Expand Down
6 changes: 5 additions & 1 deletion web/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@trinsic/trinsic",
"name": "@trinsic/sdk",
"version": "1.0.0",
"description": "Node and Browser wrapper for the Trinsic services",
"browser": {
Expand All @@ -10,6 +10,10 @@
"files": [
"lib/**/*"
],
"exports": {
".": "./lib/index.js",
"./browser": "./lib/browser.js"
},
"scripts": {
"build": "npm run build:proto && npm run build:typescript",
"build:proto": "pwsh Generate-Proto.ps1",
Expand Down