install-all
v2.1.1
Published
Recursively install packages in all subdirectories with package.json files, using the appropriate package manager.
Maintainers
Readme
install-all
Simple script designed to run the correct package install command in all folders that contain
a package.json recursively deep from the point the command is run
Born from the situation of having to set up a new development machine with over
30 different folders to run npm install. My motto is always "Work smarter, not
harder"
Example
Imagine you've got the directory:
code
|--- project 1
|--- project 2
| |--- server
| |--- client
|--- project 3Normally you'd have to go into each project folder and run npm install/yarn install/etc.
Now you can just run install-all in the code directory and the correct install will be run
for each subdirectory!
Installation
Install this globally so you can run it wherever you need to.
npm
$ npm install -g install-allpnpm
$ pnpm add -g install-allyarn classic
$ yarn global add install-allbun
$ bun install -g install-allUsage
Navigate to the top level folder and run the following:
$ install-allOptions
| Flag | Short | Description |
|------|-------|-------------|
| --version | -v | Print the version number and exit |
| --help | -h | Show help message and exit |
| --clean | -c | Run clean install (npm ci, yarn/pnpm/bun install --frozen-lockfile) |
Clean Install
Use the --clean flag to perform a clean install in each project directory. This removes
existing node_modules and installs from the lock file exactly, which is useful for CI
environments or when you want a fresh, reproducible install:
$ install-all --clean