Automate package name replacement in package.json #1
Labels
documentation
Improvements or additions to documentation
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
Problem
Currently, the
name
field in thepackage.json
file is static. When a user clones the boilerplate, they have to manually change thename
field to their project's name. This can be a bit inconvenient and goes against the principle of a boilerplate, which should be ready to use out of the box.Proposed Solution
We should automate the process of replacing the
name
field in thepackage.json
file with the user's input name. This can be achieved by creating a setup script that prompts the user for their project name and automatically replaces thename
field in thepackage.json
file.Here's a basic example of how this could be implemented in Node.js:
This script uses the prompt module to ask the user for their project name, then reads the package.json file, replaces the name field with the user’s input, and writes the changes back to the package.json file.
Next Steps
Implement the setup script.
Update the README to include instructions for the setup script.
This will make the boilerplate more user-friendly and ready to use out of the box.
The text was updated successfully, but these errors were encountered: