Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Improve run of setup script with normalized string output for package.json #606

Open
DaneTheory opened this issue Jan 13, 2019 · 0 comments · May be fixed by #661
Open

Comments

@DaneTheory
Copy link
Contributor

PROBLEM
During the new creation of a react-slingshot based project, on run of setup script, the console prompts input of a project description. Currently, if the user provides double-quotes somewhere within this step of the process and then continues to complete setup; upon initial run of start script, an error occurs causing start to fail. The console's error output does not provide immediately obvious reason for failure, something newcomer's to node/react in particular will find difficult to debug. React-slingshot is a well-known, widely utilized boilerplate; which makes it's appeal as a learning tool for newcomers to node/react all that more relevant to the context of this problem.

SOLUTION
The issue is based around improperly formatted string output for valid JSON (package.json), and not improper format related to valid package.json value entry (i.e. uppercased project names). As such, it makes sense that the solution to the problem be the responsibility of the setup script itself and not that of the user. Rather than provide the user with an error message explaining how to use double quotes, instead have the input value at this step of the setup process normalized via an internal validation utility method/function which is run within setup.

ALTERNATIVES
Upon invalid input at this step of the setup process, provide the user with an error message that tells the user to re-enter the project description and instructs them on how to properly escape characters for valid JSON output. See SOLUTION to find argument against this alternative.

@DaneTheory DaneTheory changed the title Improve run of setup script with normalized string output for package.json FEATURE REQUEST: Improve run of setup script with normalized string output for package.json Jan 13, 2019
@DaneTheory DaneTheory changed the title FEATURE REQUEST: Improve run of setup script with normalized string output for package.json Feature Request: Improve run of setup script with normalized string output for package.json Jan 13, 2019
@m10 m10 linked a pull request Oct 24, 2020 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant