Skip to content

NPMify!#91

Open
Lev-Stambler wants to merge 4 commits intomainfrom
lev/npmifiy
Open

NPMify!#91
Lev-Stambler wants to merge 4 commits intomainfrom
lev/npmifiy

Conversation

@Lev-Stambler
Copy link
Copy Markdown
Collaborator

  • 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

@Lev-Stambler Lev-Stambler requested a review from Sladuca May 14, 2021 20:40
@vercel
Copy link
Copy Markdown

vercel bot commented May 14, 2021

Deployment failed with the following error:

The most recent charge for your active payment method has failed. Please update it here: https://vercel.com/teams/baf-wallet/settings/billing.

Copy link
Copy Markdown
Contributor

@Sladuca Sladuca left a 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

import { Env } from './configs';
import { Pair } from './misc';

export type ChainAsType = 'near' | 'ethereum';
Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Collaborator Author

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": {}
}
Copy link
Copy Markdown
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants