spabloramirez
2/3/2016 - 12:31 PM

NPM - Gestor de paquete para Node.js

NPM - Gestor de paquete para Node.js

https://www.npmjs.com/

Generate package.json

npm init

Install packages from package.json

npm install

Install a local package and also update package.json

npm install <pkg> [--save|--save-dev]
  

Install a global package

npm install [--global] <pkg>
  

Install package from differents sources

 npm install <pkg>
 npm install <pkg>@<version>
 npm install <pkg>@<version range>
 npm install <git:// url>
 npm install <github username>/<github project>

Update package

npm outdated (check updates)
npm update 

Unistall package

npm uninstall <pkg> [--save|--save-dev]

List installed packages

npm list [--global]

Usage info

npm -l