Closed pragyandas closed 5 years ago
npm init
will install and run create-wasm-app
for you -- I'm not sure I understand the motivation here. Can you explain a bit more?
npm init
is used to create an empty node project. The create-wasm-app is a template which needs to be installed globally before using it. Moreover, making create-wasm-app
available in the PATH makes it convinient to use everywhere (thereby making it semantically better).
npm init
is used to create an empty node project.
npm init
will also optionally use a create-*
template script to initialize a new project, which is what we are doing here.
The create-wasm-app is a template which needs to be installed globally before using it.
That's not true: npm init foo
will automatically download and run the create-foo
package for you, and it doesn't already need to be installed globally or be on your $PATH.
I'm inclined to close this PR unless I am completely missing something.
The command described in the book didn't work for me, but the steps that I have added/updated work. If there is no issue with the steps (or if it is unique to me) I think we can close the PR.
Do you have the most up-to-date npm, as described here? https://rustwasm.github.io/book/game-of-life/setup.html#npm
I have
$ npm --version
6.2.0
The npm init
docs also show off using create-*
templates here: https://docs.npmjs.com/cli/init#examples
I am pretty sure this is just an old npm version, so I'm going to close this issue, and if updating your npm doesn't solve your problems, we can reopen. Thanks!
Summary
Explain the motivation for making this change. What existing problem does the pull request solve? 🤔
In section
Putting it into a Web Page
:create-wasm-app
template installation description is insufficientcreate-wasm-app
semantically stronger