Please enable JavaScript.
Coggle requires JavaScript to display documents.
npm (update (update local package (npm outdated, npm update (in the same…
npm
update
update npm
npm install
npm@latest
-g
update local package
npm outdated
npm update (in the same directory as package.json file)
update global package
npm update -g <package_name>
install
install package locally (use as modules)
npm install <package_name>
install package globally
(use as a command line tool)
npm install -g <package_name>
install dependency packages
(will update package.json)
npm install <package_name> --save
npm install <package_name> --save-dev
publish
npm publish
npm version <update_type>
patch: bug fixes and other minor changes
minor: new features dont' break existing features
major: changes which break backwards compatibility
npm init
package.json
name
version
Patch releases: 1.0 or 1.0.x or ~1.0.4
Minor releases: 1 or 1.x or ^1.0.4
Major releases: * or x
description
main
index.js
exports
dependencies
devDependencies
tags
npm dist-tags add <pkg>@ <version> [<tag>]
npm publish will tag your package with
latest
tag
npm install <pkg>@ <tag>
config
npm config ls
npm config get prefix
npm config set prefix <prefix_path>
npm login
npm adduser (if not registered)
scope
@ scope/package-name
Symlink
npm link
uninstall
(opposite with install)
https://docs.npmjs.com/