-
Notifications
You must be signed in to change notification settings - Fork 0
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
NPMify! #91
base: main
Are you sure you want to change the base?
NPMify! #91
Conversation
Lev-Stambler
commented
May 14, 2021
- Publish packages to NPM script
- Move token <--> indivisible units to utils
- Move Pair to interfaces cause circular dependencies
- Add ChainAsType to improve ease of use for external apps using the library
Deployment failed with the following error:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Just one small change and possibly another - see comments for more details
|
||
export type ChainAsType = 'near' | 'ethereum'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What exactly does this do? Is this for code I wrote a long time ago that expected it to be a type and not a enum?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just to make the api easier for the library. Like you can do tokenInfo('near') instead of Chains.Near
"@toruslabs/torus-direct-web-sdk": "^4.11.1" | ||
}, | ||
"peerDependencies": {} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add an exports property here so that we can import it like @baf-wallet/core/interfaces
instead of having to do @baf-wallet/core/src/interfaces
to get interfaces (and similarly for other non-default libs)?
see https://webpack.js.org/guides/package-exports/ for more information