Skip to content
/ bulk Public
forked from hughsk/scoped-bulk

Run a command from every installed npm package under a certain directory

License

Notifications You must be signed in to change notification settings

timoxley/bulk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bulk experimental

Run a command in every directory within a directory.

Build Status

NPM NPM

End goal of this package is to make a more intuitive, simpler alternative to find/grep + xargs.

This is a more generalised fork of hughsk/scoped-bulk

CLI Usage

Usage:
  echo ./* | bulk -c "<command...>"
  bulk -c "<command...>" ./*

For example, running the following in your project root might yield something like this:

> ls -A | bulk -c "pwd"
/Users/timoxley/Projects/bulk/.git
/Users/timoxley/Projects/bulk/node_modules
/Users/timoxley/Projects/bulk/test

Clean all node_modules from children

This works well for cleaning dependencies out of symlinked packages, and allows for rededuplication without doing a full install.

bulk  -c "rm -rf ." node_modules/*

Install the dependencies of locally scoped modules:

You can use this, for example, to install the dependencies of locally scoped modules:

echo node_modules/@scoped/* | bulk -c "npm install --production"

Exit any time a nonzero exit code occurs

Runs all commands but exits on the first nonzero exit code.

linklocal list -r | bulk -c 'npm test' -e

License

MIT. See LICENSE.md for details.

About

Run a command from every installed npm package under a certain directory

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%