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

Update "Usage" section to mention project name #70

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update "Usage" section to mention project name #70

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Mar 9, 2019

npm init wasm-app apparently fails without a project name given. See issue #44.

`npm init wasm-app` apparently fails without a project name given. See issue #44.
@olisolomons
Copy link

I believe the project name is optional. Perhaps it should be:
npm init wasm-app [<project-name>]

@ashleygwilliams
Copy link
Member

it is not currently optional! (tho i feel that perhaps it should be.) thanks for this PR!

@olisolomons
Copy link

Looking at the code, lines 6-13 of .bin/create-wasm-app.js it looks like the project name is optional:

let folderName = '.';

if (process.argv.length >= 3) {
  folderName = process.argv[2];
  if (!fs.existsSync(folderName)) {
    fs.mkdirSync(folderName);
  }
}

This code means that if the argument is omitted then folderName is '.', which is the current directory.

Am I looking at the wrong file or branch?

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

Successfully merging this pull request may close these issues.

None yet

3 participants