An Interest In:
Web News this Week
- April 1, 2024
- March 31, 2024
- March 30, 2024
- March 29, 2024
- March 28, 2024
- March 27, 2024
- March 26, 2024
February 1, 2021 07:55 am GMT
Original Link: https://dev.to/giulia_chiola/node-js-cheatsheet-25k0
Node.js cheatsheet
Few commands I found very useful during development.
Command | Description |
---|---|
npm list | show a tree of every package found in the current folder |
npm list -g | same as above ^^, but search also in global packages |
npm list -g --depth=0 | same as above ^^, but do not show every packages dependencies |
npm list [package name] | show a tree of every instance found in the current folder of that specific package |
npm install | install all packages in package.json |
npm install [package name] | install a package |
npm install [package name] --save | install a package as dependency |
npm install [package name] --save-dev | install a package as dev dependency |
npm uninstall [package name] | uninstall a package |
npm install --save username/repo#branch-name-or-commit-or-tag | install package from GitHub repository |
Alias
Alias | Command |
---|---|
npm i | npm install |
npm i [package name] -D | npm install [package name] --save-dev |
Bonus tip
npm-check is a useful tool to check for outdated, incorrect, and unused dependencies
More info
Original Link: https://dev.to/giulia_chiola/node-js-cheatsheet-25k0
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To