mirror of
https://github.com/Erreur32/cheat.git
synced 2024-12-22 21:52:12 +01:00
commit
0edd1450dc
1 changed files with 22 additions and 0 deletions
22
cheat/cheatsheets/npm
Normal file
22
cheat/cheatsheets/npm
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
# Every command shown here can be used with the `-g` switch for global scope
|
||||||
|
|
||||||
|
# Install a package in the current directory
|
||||||
|
npm install <package>
|
||||||
|
|
||||||
|
# Install a package, and save it in the `dependencies` section of `package.json`
|
||||||
|
npm install --save <package>
|
||||||
|
|
||||||
|
# Install a package, and save it in the `devDependencies` section of `package.json`
|
||||||
|
npm install --save-dev <package>
|
||||||
|
|
||||||
|
# Show outdated packages in the current directory
|
||||||
|
npm outdated
|
||||||
|
|
||||||
|
# Update outdated packages
|
||||||
|
npm update
|
||||||
|
|
||||||
|
# Update `npm` (will override the one shipped with Node.js)
|
||||||
|
npm install -g npm
|
||||||
|
|
||||||
|
# Uninstall a package
|
||||||
|
npm unintall <package>
|
Loading…
Reference in a new issue