Spaces in project names are not handled properly
Created by: wojtekmaj
Description
create-react-app allows you to create an app with spaces (and uppercase letters). Simply fire create-react-app "Example project"
and it will be created! This, however, creates some issues stated below.
Expected behavior
- create-react-app should disallow creating apps with spaces and uppercase letters
OR
- create-react-app should detect if there are spaces/uppercase letters in project name provided by the user and:
- Success message after creating an app should wrap project name in quotes if necessary
- Project name in package.json should have spaces changed to dashes to avoid npm error
Actual behavior
After the app is created using the command above, a help message is displayed suggesting to go to the folder created by create-react app (sorry, don't remember it word-by word):
> App created successfully (...)
> Run the following command:
> cd **{project_name_here}**
Obviously, running command like cd ./My project
won't work (we need to use command like cd "./My project"
).
Furthermore, running the app fails as the name containing spaces is also inserted into package.json file, and npm throws an error.