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

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