NPM: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
Line 50: Line 50:
{|
{|
| valign="top" |
| valign="top" |
* [https://flaviocopes.com/npx/ Install <code>NPX</code> as a standalone package instead of <code>NPM </code>]
* [https://flaviocopes.com/npx/ Install <code>NPX</code> as a standalone package instead of <code>NPM</code>]
* [https://docs.npmjs.com/cli/v7/configuring-npm/folders Folder Structures Used by <code>NPM</code>]
* [https://docs.npmjs.com/cli/v7/configuring-npm/folders Folder Structures Used by <code>NPM</code>]
* [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]
Line 72: Line 72:
* [https://docs.npmjs.com/cli/v7/commands/npm-install Install a package]
* [https://docs.npmjs.com/cli/v7/commands/npm-install Install a package]
* [[Express]]
* [[Express]]
|}
----
{|
| valign="top" |
* [https://stackoverflow.com/questions/37372816/ What does <code>@</code> symbol mean in <code>import</code>?]
* [https://stackoverflow.com/questions/49151868/ Why some <code>npm</code> packages start with <code>@</code>?]
| valign="top" |


|}
|}

Revision as of 02:57, 20 May 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 config set key=value [key=value...]
npm config delete key [key ...]
npm config get [key ...]
npm config list
npm config edit
npm install npm@latest -g
npm list -g --depth 0
node -v
npm -v
npm cache clean -f && npm install -g n && n stable
npm install -g npm
npm upgrade -g
npm update -g

References