Description
Currently, the package.json file does not dynamically update the author and name fields based on the GitHub username and repository name. Also change the user's version to '0.0.1'. This feature issue aims to adapt the src/main/scripts/bin.js script to automatically change these fields to reflect the user's information, and not the template.
Current Behavior
When I run "npx @rubemfsv/clean-react-app my-app", it comes with this project package json, with rubemfsv author, @rubemfsv/clean-react-app name and its current vesion.
Expected Behavior
When I run "npx @rubemfsv/clean-react-app my-app", in my machine, I'd like to see:
- The
package.json file's name field is dynamically updated to match the repoName.
- The
author field in package.json includes the GitHub username of the user's machine.
- The
package.json file's version field is dynamically updated to match the version '0.0.1'`.
Tasks:
-
Modify bin.js script:
- Update the
bin.js script to fetch the GitHub username in the user's machine, and you already have the repoName.
- Use this information to update the
name field in package.json to match the repoName.
- You can update to the prefixed version '0.0.1', don't need to be dynamic.
-
Testing:
- Verify that the changes work as expected by running the script and checking the
package.json file.
- Ensure that the
name, author and version fields are correctly updated.
Additional Information:
- This feature will make it easier for users to initialize projects with the correct GitHub information automatically populated in the
package.json file.
Acceptance Criteria:
- The
package.json file's name field is dynamically updated to match the repoName.
- The
author field in package.json includes the GitHub username of the user's machine.
- The
version field in package.json is '0.0.1' for new projects.
Description
Currently, the
package.jsonfile does not dynamically update theauthorandnamefields based on the GitHub username and repository name. Also change the user's version to '0.0.1'. This feature issue aims to adapt thesrc/main/scripts/bin.jsscript to automatically change these fields to reflect the user's information, and not the template.Current Behavior
When I run "npx @rubemfsv/clean-react-app my-app", it comes with this project package json, with rubemfsv author, @rubemfsv/clean-react-app name and its current vesion.
Expected Behavior
When I run "npx @rubemfsv/clean-react-app my-app", in my machine, I'd like to see:
package.jsonfile'snamefield is dynamically updated to match therepoName.authorfield inpackage.jsonincludes the GitHub username of the user's machine.package.jsonfile'sversionfield is dynamically updated to match the version '0.0.1'`.Tasks:
Modify
bin.jsscript:bin.jsscript to fetch the GitHub username in the user's machine, and you already have the repoName.namefield inpackage.jsonto match therepoName.Testing:
package.jsonfile.name,authorandversionfields are correctly updated.Additional Information:
package.jsonfile.Acceptance Criteria:
package.jsonfile'snamefield is dynamically updated to match therepoName.authorfield inpackage.jsonincludes the GitHub username of the user's machine.versionfield inpackage.jsonis '0.0.1' for new projects.