From d82eee726cb893f7ba6cc1b66d86c99579974af1 Mon Sep 17 00:00:00 2001 From: Morgan Courbet Date: Fri, 9 Sep 2016 10:05:22 +0200 Subject: [PATCH] Add npm cheatsheet --- cheat/cheatsheets/npm | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 cheat/cheatsheets/npm diff --git a/cheat/cheatsheets/npm b/cheat/cheatsheets/npm new file mode 100644 index 0000000..73c9b3d --- /dev/null +++ b/cheat/cheatsheets/npm @@ -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 + +# Install a package, and save it in the `dependencies` section of `package.json` +npm install --save + +# Install a package, and save it in the `devDependencies` section of `package.json` +npm install --save-dev + +# 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