npm – Cheat Sheet

0

Init

npm init

Run script

npm run <script>

e.g.
npm run watch

Install Module

npm install --save <module>

Uninstall Module

npm uninstall <module>
npm install <module> --global

package.json Scripts block Example

...
"scripts": {
    "start": "node ./index.js",
    "watch": "nodemon ./index.js",
    "test": "echo \"Error: no test specified\" && exit 1"
},
...
Share.

About Author

Christian Unnerstall

Christian Unnerstall, founder of devshooin.com, enjoys designing and building things that look nice and work well, whether it's websites or services within the interwebs. Have questions - feel free to reach out to him. Enjoy

Leave a Reply