npm
npm install package-name -g
npm init
-This will create the package.json for your project.
-This will prompt questions in the terminal to set up your package.json
npm package-name —save
-This will install the nam package to your projects node modules and package.json
Require in project example in app.js
var example = require(‘example’)
Create a .gitignore file in the root directory and include file to ignore.
example: node_modules/
These are modules needed in development and not to run the website in production. Example: testing frame works
npm install package-name —save-dev
npm outdate
-This will show you all the npm modules in your project that are out of date.
npm outdate -g
-This will show you all of the projects that are out of date in the global environment.
npm update
-This will update all of the npm modules in your project.
npm update package name
-This will update a specific package in your project.
npm update package name -g
-This will update a specific global package.
npm unistall package-name —save
-This will remove an npm package from the projects node_modules and package.json
npm uninstall package-name -g
-This will remove an npm package globally.