Install npm packages while keeping only their major version in package.json
npm i -g npmajor
All the following commands are a valid way to install packages on dependencies.
npmajor <packages ...>
npmajor i <packages ...>
npmajor install <packages ...>
Use official --save-dev
flag to install packages on devDependencies. Alias -D
is also available.
npmajor --save-dev <packages ...>
npmajor i --save-dev <packages ...>
npmajor install --save-dev <packages ...>