Skip to content

Instantly share code, notes, and snippets.

@ArunHub
Last active March 28, 2019 15:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ArunHub/355c7f75c4ec1914a56ee116d887aafa to your computer and use it in GitHub Desktop.
Save ArunHub/355c7f75c4ec1914a56ee116d887aafa to your computer and use it in GitHub Desktop.
npm commands
  • To run a file from folder:
    • for example: I want run a gulpfile.js as index.js in tasks folder from root directory

      npm command: gulp --gulpfile tasks

      Here --gulpfile denotes gulpfile.js and searches it as index.js in tasks folder

Install $ npm install -g npm-check Use $ npm-check

npm list for local packages or npm list -g for globally installed packages.

Another quick way of finding out what packages are installed locally and without their dependencies is to use:

npm list --depth=0 list all packages

npm install -g npm-check-updates

ncu -u

refer https://github.com/tjunnone/npm-check-updates

npm outdated -g --depth=0 npm update -g

npm outdated npm update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment