NPM: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
No edit summary
Line 54: Line 54:
* [https://docs.npmjs.com/cli/v7/commands/npm-config Manage the npm configuration files]
* [https://docs.npmjs.com/cli/v7/commands/npm-config Manage the npm configuration files]
* [https://docs.npmjs.com/cli/v7/commands/npm-pack Create a tarball from a package]
* [https://docs.npmjs.com/cli/v7/commands/npm-pack Create a tarball from a package]
* [https://www.twilio.com/blog/how-to-build-a-cli-with-node-js How to build a CLI with Node.js]
* [https://flaviocopes.com/npm-packages-local-global/ NPM global or local packages]
* [https://flaviocopes.com/npm-packages-local-global/ NPM global or local packages]
* [https://docs.npmjs.com/cli/v7/commands/npm-cache Manipulates packages cache]
* [https://docs.npmjs.com/cli/v7/commands/npm-cache Manipulates packages cache]

Revision as of 03:21, 14 March 2021

npm install <git-host>:<git-user>/<repo-name>
npm install <alias>@npm:<name>
npm install <git repo url>
npm install <tarball file>
npm install <tarball url>
npm install <folder>
npm install [<@scope>/]<name>@<version range>
npm install [<@scope>/]<name>@<version>
npm install [<@scope>/]<name>@<tag>
npm install [<@scope>/]<name>

npm install
aliases: npm i, npm add
common options: [-P|--save-prod|-D|--save-dev|-O|--save-optional|--save-peer] [-E|--save-exact] [-B|--save-bundle] [--no-save] [--dry-run]

Knowledge

npm install npm@latest -g
npm list -g --depth 0
node -v
npm -v
npm config set key=value [key=value...]
npm config delete key [key ...]
npm config get [key ...]
npm config list
npm config edit

References