1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-22 06:02:18 +02:00
tldr/pages/common/npm.md
Lucas Gabriel Schneider a5fe31bc47
multiple pages: format technical tokens (#5119)
Co-authored-by: bl-ue <54780737+bl-ue@users.noreply.github.com>
Co-authored-by: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
2021-01-31 12:05:18 -05:00

904 B

npm

JavaScript and Node.js package manager. Manage Node.js projects and their module dependencies. More information: https://www.npmjs.com/.

  • Interactively create a package.json file:

npm init

  • Download all the packages listed as dependencies in package.json:

npm install

  • Download a specific version of a package and add it to the list of dependencies in package.json:

npm install {{module_name}}@{{version}}

  • Download a package and add it to the list of dev dependencies in package.json:

npm install {{module_name}} --save-dev

  • Download a package and install it globally:

npm install -g {{module_name}}

  • Uninstall a package and remove it from the list of dependencies in package.json:

npm uninstall {{module_name}}

  • Print a tree of locally-installed dependencies:

npm list

  • List top-level globally installed modules:

npm list -g --depth={{0}}