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

Remove outdated npm instruction. #1757

Closed
wants to merge 1 commit into from
Closed

Remove outdated npm instruction. #1757

wants to merge 1 commit into from

Conversation

fnando
Copy link
Member

@fnando fnando commented Nov 25, 2024

What

This instruction doesn't make sense now that --frontend-template has been removed.

Why

So the output makes sense.

Known limitations

N/A

This instruction doesn't make sense now that `--frontend-template` has
been removed.
Comment on lines -145 to -148
print.infoln(format!(
"Run \"npm install && npm run build\" in {:?} to build the JavaScript NPM package.",
self.output_dir
));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We just added this instruction because it is relevant to the typescript bindings, which create an npm package, but the cli no longer installs and builds the package. That is now the job of the user. This command is independent of the frontend template feature that used to exist in the contract init command.

Copy link
Member Author

@fnando fnando Nov 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this instruction won't work unless you follow whatever we had on the template; npm run build is not a standard task and can be something completely different depending on how you set up your project.

Let's say you have a hello smart contract project, and the dapp lives somewhere else, and you're using stellar contract bindings typescript --out-dir ../hello-dapp, then this also is misleading, because I'd run it on the smart contract dir, which is not a js project.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, i just got the message. It doesn't mention the current dir, it mentions the output dir, which has everything mentioned on the task. My bad! 🤦‍♂️

@fnando fnando closed this Nov 25, 2024
@fnando fnando deleted the npm-instruction branch November 25, 2024 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants