bulk

2.0.1 • Public • Published

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.

Package Sidebar

Install

npm i bulk

Weekly Downloads

49

Version

2.0.1

License

MIT

Last publish

Collaborators

  • timoxley
  • hughsk