Skip to content
This repository was archived by the owner on Aug 25, 2025. It is now read-only.

Update "Usage" section to mention project name#70

Open
ghost wants to merge 1 commit into
masterfrom
unknown repository
Open

Update "Usage" section to mention project name#70
ghost wants to merge 1 commit into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Mar 9, 2019

Copy link
Copy Markdown

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
Copy Markdown

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

@ashleygwilliams

Copy link
Copy Markdown
Member

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

@olisolomons

Copy link
Copy Markdown

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants