Skip to content

Latest commit

 

History

History
56 lines (44 loc) · 841 Bytes

npm.md

File metadata and controls

56 lines (44 loc) · 841 Bytes

npm

List global packages with details.

npm ls -gl --depth=0

View details of a npm package

npm view <package> [versions|author|license]

Set default configuration for package.json

npm set init.author.name "$NAME"
npm set init.author.email "$EMAIL"
npm set init.author.url "$SITE"

Bump package version

npm version 2.1.0

Flatten and deduplicate the dependency tree.

npm dedupe

Remove extraneous packages

npm prune

Open the bugtracker of a package

npm bugs <package>

npm bugs # Current project's bugtracker

Basic npm troubleshooting

npm doctor

Silent option

npm run has a --silent option which reduces the output in the Terminal.

"scripts": {
  "lint": "xo",
  "lint:fix": "npm run lint --silent -- --fix",
}