mirror of
https://github.com/tldr-pages/tldr.git
synced 2024-10-31 02:18:01 +01:00
9dc3893c59
Am I the only one who always forgets if it's --saveDev or --save-dev? My suggestions add --save-dev too. 💩
692 B
692 B
npm
JavaScript and Node.js package manager. Manage Node.js projects and their module dependencies.
- Download and install a module globally:
npm install -g {{module_name}}
- Download all dependencies referenced in package.json:
npm install
- Download a given dependency, and add it to the package.json (as
dependencies
):
npm install {{module_name}}@{{version}} --save
- Download a given dependency, and add it to the package.json (as
devDependencies
):
npm install {{module_name}}@{{version}} --save-dev
- Uninstall a module:
npm uninstall {{module_name}}
- List a tree of installed modules:
npm list
- Interactively create a package.json file:
npm init