-
Notifications
You must be signed in to change notification settings - Fork 240
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
[RRFC] Top-level command to manage package.json #398
Comments
5 tasks
Suggestion:
Examples:
|
Other thoughts:
Look into userland How do add to an array, or remove an entry from an array? |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Motivation ("The Why")
Some users prefer managing their
package.json
using npm cli comands rather than manually editing a JSON file.As of today, some of the npm cli commands already handle the automated management of the
package.json
file, such asnpm install
adding / updating dependency declarations,npm version
bumping the version value, or in the case ofnpm set-script
a top-level command that serves specifically the purpose of managing"scripts"
data in thepackage.json
file.Example
How
Introduce a new top-level command
npm pkg
that would help managing the remainingpackage.json
fields and centralize this management under a single command.Current Behaviour
Taking the current
npm set-script
type of behavior:$ npm set-script lint eslint
Desired Behaviour
Migrate set-script under a single pkg top-level command and expand it to make it possible to manage the reminder of
package.json
fields.$ npm pkg set script --key=lint --value=eslint
References
The text was updated successfully, but these errors were encountered: