-
Notifications
You must be signed in to change notification settings - Fork 239
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# npm pkg | ||
|
||
## Summary | ||
|
||
A new top-level command that manages any property in your `package.json`. | ||
|
||
## Motivation | ||
|
||
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 as `npm install` adding / updating dependency declarations, `npm version` bumping the version value, or in the case of `npm set-script` a top-level command that serves specifically the purpose of managing `"scripts"` data in the `package.json` file. | ||
|
||
## Detailed Explanation | ||
|
||
- Add a `npm pkg` command | ||
|
||
## Rationale and Alternatives | ||
|
||
{{Discuss 2-3 different alternative solutions that were considered. This is required, even if it seems like a stretch. Then explain why this is the best choice out of available ones.}} | ||
|
||
## Implementation | ||
|
||
- Add a new `lib/pkg.js` top-level command that will handle adding / removing / modifying properties in your `package.json` file. | ||
|
||
## Prior Art | ||
|
||
- `npm set-script` top-level command that allow users to add new scripts to their package.json | ||
- `npm init -w <ws-path>` init command will add the current path to `"workspaces"` property | ||
- `npm install|uninstall <pkg>` will add/remove deps to `"dependencies"` | ||
|
||
## Unresolved Questions and Bikeshedding | ||
|
||
- Syntax? |