npm help install
npm help-search remove
npm apihelp prune
npm set init-author-name "Phu Phan"
npm set init-author-email "phudev95@gmail.com"
npm set init-license "MIT"
npm get init-author-name
npm get init-author-email
npm get init-license
npm install angular --save-dev
npm install angular -D
npm i angular -D
npm install angular --save
npm install angular -S
npm i angular -S
npm i global <package-name>
npm list -g --depth 0 (Show all global packages installed)
npm uninstall <package-name> --save
npm uninstall <package-name> --save-dev
npm list (All dependencies)
npm list --depth 0 (All package with tree of Level 0)
npm list --depth 0 --dev true (All package with tree of Level 0 and it in group Dev)
npm list --depth 0 --long true (All package with tree of Level 0 and more info for each packages)
npm list --depth 0 --json true (Save behave, but it will return Json type)
npm list --parseable true (All packages, and show full path fol all)
npm list --global true (All dependencies)
npm list --global true --depth 0 (All global package with tree of Level 0)
npm list --global true --depth 0 --json true
npm i underscore@1.8.3
npm i underscore@1.8.x
npm i underscore@1.8
npm i underscore@1.7
npm i underscore@1.x
npm i underscore@1
npm i underscore@">=1.1.0 <1.4.0"
npm i underscore@1.8.2 --save --save-exact (--save-exact: Remove @ before version in package)
npm install express
npm install https://github.com/strongloop/express
Ex: https://gist.github.com/aba9ac1b45bb63425348fbc122833e4b.git
npm i gist:aba9ac1b45bb63425348fbc122833e4b
npm i ../hello-world --save
Go to website https://www.npmjs.com/search?q=underscore to searching packages
or you can using command:
npm search underscore
npm prune --production
npm repo express
npm repo underscore
MAJOR -> MINOR -> PATCH
- Init package
- Init git
npm adduser
npm publish
npm info <project-name>
npm repo
npm tag <version-number>
npm push --tag
Change version in file package.json
- Add all change to git
git add .
git commit -m "update version blabla"
git tag
git push --tags
git push origin master
- Version of package: 1.1.0-beta.2
git tag 1.1.0-beta.2
git push --tags
npm publish --tag beta