npm-installs
is a command-line application that allows you to run npm install
on specified directories concurrently using a single command. It also has support for recursive installs with an optional specified depth.
npm-installs
will automatically exclude all /node_modules
directories.
npm i -g npm-installs
npm-installs <...dirs> [options]
$ npm-installs proj1 proj2
Starting `npm install` for '/Users/johndoe/projects/proj1'
Starting `npm install` for '/Users/johndoe/projects/proj2'
Completed '/Users/johndoe/projects/proj1'
Completed '/Users/johndoe/projects/proj2'
Completed all
If the specified directory contains a package.json
, it will also have npm install
called on it.
$ npm-installs projects -r
Starting `npm install` for '/Users/johndoe/projects/proj1'
Starting `npm install` for '/Users/johndoe/projects/proj2'
Completed '/Users/johndoe/projects/proj1'
Completed '/Users/johndoe/projects/proj2'
Completed all
Folder structure
~/project-root
/proj1
/proj2
/subproj1
/subproj2
/deeplynestedproj
With a depth of 2, /deeplynestedproj
will be excluded
$ npm-installs project-root -d 2
Starting `npm install` for '/Users/johndoe/project-root'
Starting `npm install` for '/Users/johndoe/project-root/proj1'
Starting `npm install` for '/Users/johndoe/project-root/proj2'
Starting `npm install` for '/Users/johndoe/project-root/proj2/subproj1'
Starting `npm install` for '/Users/johndoe/project-root/proj2/subproj2'
Completed '/Users/johndoe/project-root'
Completed '/Users/johndoe/project-root/proj1'
Completed '/Users/johndoe/project-root/proj2'
Completed '/Users/johndoe/project-root/proj2/subproj1'
Completed '/Users/johndoe/project-root/proj2/subproj1'
Completed all