-
Notifications
You must be signed in to change notification settings - Fork 77
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
Change the default to not npm build
#1512
Comments
I'm not sure the bindings generate command should output an incomplete view of the generated bindings. The bindings generated are dependent on a specific version of the js-stellar-sdk and other dependencies, and so outputting an incomplete bundle seems like it would set folks up for failure. The suggested output helps. I'd like to understand what the specific inconvenience is. For folks who don't want the whole NPM package they can generate the bindings and copy out the Is the inconvenient piece of the existing workflow doing a Or is the inconvenient piece that bindings call If it's the latter, then I think it'd make sense to add an option to skip the npm executions. It removes the inconvenient piece for folks who want to take the typescript elsewhere. It serves other use cases where someone wants to do the npm piece just not right now or not on this system. |
Copying out the |
Great points. I like the idea of adding a |
👍🏻 |
After discussion, we agreed to changing the default behavior to not build. We will not add any flags. |
--file-only
optionnpm build
Part of the reason was that someone pointed out that in other ecosystems like solidity the code gen just generates files and it's up to the user to run npm commands. Given that it is easy to call |
+1 When removing the calls to npm it's pretty important we educate the user on what got generated and what they need to do to use it, so it's pretty critical we include output like this. |
I've opened two PRs relating to this issue, and the area of code it refers: |
What problem does your feature solve?
Some pro users don't want to use our TS Bindings because a whole NPM package feels too heavy.
What would you like to see?
Let's add a
--file-only
option to thebindings typescript
command that will:honor the
--output-dir
option, and emit only[output-dir]/index.ts
(NOT[output-dir]/src/index.ts
)output a message to stdout (or stderr, whatever the rest of the file is doing) saying:
Print that you need node and npm installed
What alternatives are there?
Don't
The text was updated successfully, but these errors were encountered: