masscom
v1.3.1
Published
Run a shell command in every immediate subdirectory of the current directory
Maintainers
Readme
masscom
Run a shell command in every immediate subdirectory of the current directory.
Install
The best way to use this package is by installing it globally
npm install -g masscomUsage
masscom [OPTION]... [COMMAND]masscom loops over the subdirectories of the current directory, changes into each one, and runs the given command with the working
directory set to that subdirectory. By default only immediate subdirectories are visited; use --level to recurse deeper.
# Run tests in every subproject
masscom "npm test"
# Check git status everywhere
masscom "git status"Options
| Option | Description |
| ------------------------ | -------------------------------------------------------------- |
| -h, --help | Display the help message |
| -l, --level | Run the command up to this many levels deep (default: 1) |
| -i, --ignore <names> | Skip directories with these names, comma-separated or repeated |
How it works
- With
--level(or-l), the walk recurses up to that many levels deep into every subdirectory tree. - With
--ignore(or-i), matching directory names are skipped at every level. Ignored directories are not recursed into. .gitandnode_modulesare always skipped, in addition to anything passed via--ignore.- The command is executed once per directory via a shell, with the subdirectory as the working directory.
- Non-directory entries and the current directory itself are skipped.
License
Released under the MIT License.
