save dependency to package.json code example
Example 1: npm install dev dependencies
npm install <package-name> --save-dev
Example 2: how to install dependencies from package.json
npm install // installs dependencies listed in package.json
npm install <package-name> --save-dev
npm install // installs dependencies listed in package.json