1.0.0 • Published 1 year ago

npm-demo-laksiriben v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

NPM Demo

Semantic Versioning (semver)

  • 2.12.34 - major.minor.patch
  • ^2.12.34 - carrot - 2.x - when running npm update, if a minor upgrade is available, get it
  • ~2.12.34 - tilda - 2.12.x - when running npm update, if patch upgrade is available, get it
  • 2.12.34 - - - get the exact version

List installed npm packages and their versions

npm list            # only main packages
npm ls
npm list -a         # --all                 # with sub dependancies
npm list --depth=2

View dependencies/ versions

npm view <package-name>
npm view mongoose depenencies
npm view mongoose versions

Instal specific version

npm ls
npm i underscore@1.4.0
npm ls

List outdated packages

npm outdated
npm -g outdated

Update packages

npm update

To update major versions

npm i -g npm-check-updates
ncu
ncu -u      # update package.json with latest versions
npm i       # install packages in package.json

Development dependencies

npm i jshint --save-dev

Uninstall a package

npm uninstall mongoose
npm un async
npm un -g npm-check-updates

Publish our own packages

npm login
laksiriben
G***************
laksiriben@gmail.com
<OTP>
npm publish