File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ # npm pkg
2+
3+ > Show or modify ` package.json ` properties.
4+ > More information: < https://docs.npmjs.com/cli/npm-pkg > .
5+
6+ - Get the value of a specific property:
7+
8+ ` npm pkg get {{name}} `
9+
10+ - Get multiple properties at once:
11+
12+ ` npm pkg get {{name version ...}} `
13+
14+ - Get multiple values across all workspaces:
15+
16+ ` npm pkg get {{name}} {{version}} {{[--ws|--workspaces]}} `
17+
18+ - Get a nested or array property value:
19+
20+ ` npm pkg get {{contributors[0].email}} `
21+
22+ - Set a property to a specific value:
23+
24+ ` npm pkg set {{property}}={{value}} `
25+
26+ - Set multiple properties at once:
27+
28+ ` npm pkg set {{property1}}={{value1}} {{property2}}={{value2}} `
29+
30+ - Delete a property from ` package.json ` :
31+
32+ ` npm pkg delete {{scripts.build}} `
33+
34+ - Auto-fix common errors in ` package.json ` :
35+
36+ ` npm pkg fix `
You can’t perform that action at this time.
0 commit comments