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

Possibility to look in node_modules for abi files #32

Closed
davidfarina opened this issue Mar 5, 2018 · 2 comments
Closed

Possibility to look in node_modules for abi files #32

davidfarina opened this issue Mar 5, 2018 · 2 comments

Comments

@davidfarina
Copy link

davidfarina commented Mar 5, 2018

It would be great to have the possibility to specify one or more npm packages where typechain will look for abi's.

Until now, we have different projects for DAPP and contracts and include the abis as an npm package to make it easier to reference the contracts, instead of pointing outside the project. Makes it less a hassle when working with CI tools to just package the contracts and include them in node_modules. Its also more adaptable when on different systems/machines etc.

I am somehow not able to put an enhancement tag to this issue so please forgive me that.

@krzkaczor
Copy link
Member

I think you should be able to accomplish it by using custom glob as mentioned in readme:
typechain "./node_modules/(packageA|packageB)" (we use https://www.npmjs.com/package/glob)
Have you tried it?

@krzkaczor
Copy link
Member

I can confirm that it works. Just specify outDir to push all contracts in one place:

typechain --outDir app/lib/contracts "./node_modules/neufund-contracts/build/contracts/*.json"

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

No branches or pull requests

2 participants