create-wasm-app icon indicating copy to clipboard operation
create-wasm-app copied to clipboard

Update "Usage" section to mention project name

Open ghost opened this issue 6 years ago • 3 comments

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

ghost avatar Mar 09 '19 00:03 ghost

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

olisolomons avatar May 21 '19 21:05 olisolomons

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

ashleygwilliams avatar Aug 21 '19 13:08 ashleygwilliams

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?

olisolomons avatar Aug 21 '19 13:08 olisolomons