This repository has been archived by the owner on Jan 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 200
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install size is not that large to make it optional
ylv-io
approved these changes
Nov 18, 2019
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.
An awesome feature to add ❤️
Quite excited for more support to TypeScript.
A few minor comments.
CLI kits test fails because new contracts-ethereum-package
2.4.0 have broke gsn tutorial
. I am not sure exactly why but it has nothing to do with this PR. cc @nventuro
packages/cli/src/commands/init.ts
Outdated
const args = { | ||
name: projectName, | ||
version, | ||
typechainEnabled: typechain ? true : typechain, |
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.
Suggested change
typechainEnabled: typechain ? true : typechain, | |
typechainEnabled: !!typechain, |
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.
Actually not the same here, just added a comment to clarify
Co-Authored-By: Igor Yalovoy <[email protected]>
Co-Authored-By: Igor Yalovoy <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I added an optional typechain step to the compilation. If this feature is enabled, after compiling, every modified contract is run through typechain to generate typescript wrappers.
The user is queried whether to enable it on two commands, and only if there is a
tsconfig.json
present (I'd like your thoughts on these!)oz init
oz compile
if there is no typechain info on the project.json fileThe user is asked three questions:
Typechain generation is quite fast, and the packages are rather small. I had initially loaded them lazily, but it ended up not making much of a difference including them in the package (not ethers though, since we don't officially support it).
Suggest reviewing commit-by-commit.