From 0a4c0f0a3705dae2a8c6d4f9f93d14f57ac6ba7b Mon Sep 17 00:00:00 2001 From: Romain Prieto Date: Tue, 4 Mar 2014 12:43:17 +1100 Subject: [PATCH] Create npm.md --- common/npm.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 common/npm.md diff --git a/common/npm.md b/common/npm.md new file mode 100644 index 0000000000..67bd44d1ff --- /dev/null +++ b/common/npm.md @@ -0,0 +1,23 @@ +# npm + +> Node package manager, to manage Node.js projects and install module dependencies. + +- Create a new project in the current folder + +`npm init` + +- Download all dependencies referenced in package.json + +`npm install` + +- Download a given dependency, and add it to the package.json + +`npm install {{module_name}}@{{version}} --save` + +- Set the version of the current project + +`npm version {{1.2.3}}` + +- Publish the current project + +`npm publish`