exerslide icon indicating copy to clipboard operation
exerslide copied to clipboard

Handle project names with spaces

Open fkling opened this issue 8 years ago • 1 comments

If exerslide init is run as

exerslide init "My Project Name"

it will fail silently. It looks like everything will have installed fine but that's not the case. That's because the project name is used in the package.json's name field which doesn't allow spaces, so npm refuses to install any dependencies.

The name is also used in other places where spaces (and other characters) are not valid.

Proposed solution

Use the passed name only as the <title> in the index.html in the HTML template. For all other cases, use the current directory name.

fkling avatar Sep 13 '16 05:09 fkling

npm packages typically use a hyphen where a space might otherwise be. Why not swap all spaces for hyphens for the package.json's name, and wherever else spaces aren't allowed?

hawkins avatar Dec 22 '16 03:12 hawkins