Giter VIP home page Giter VIP logo

bulk's Introduction

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.

bulk's People

Contributors

hughsk avatar pdufour avatar timoxley avatar yoshuawuyts avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

bulk's Issues

Doesn't seem to be working in Windows

I'm trying to run this command:

linklocal link -r && linklocal list -r | bulk -c 'npm install --loglevel http'

but it fails with this error:

Listed 2 dependencies                                                                                        
internal/child_process.js:298                                                                                
    throw errnoException(err, 'spawn');                                                                      
    ^                                                                                                        

Error: spawn UNKNOWN                                                                                         
    at exports._errnoException (util.js:870:11)                                                              
    at ChildProcess.spawn (internal/child_process.js:298:11)                                                 
    at exports.spawn (child_process.js:362:9)                                                                
    at Object.<anonymous> (D:\Workspace\project\node_modules\bulk\cli.js:11:28)                                                                                 
    at Module._compile (module.js:410:26)                                                                    
    at Object.Module._extensions..js (module.js:417:10)                                                      
    at Module.load (module.js:344:32)                                                                        
    at Function.Module._load (module.js:301:12)                                                              
    at Function.Module.runMain (module.js:442:10)                                                            
    at startup (node.js:136:18)                                                                              

Running bulk separately by just running ./node_modules/.bin/bulk throws the same error.

--bail

though it was in bulk already, but it would be cool if --bail could be given to exit on a non-0 exit code.

release 2.0.0 ?

2.0.0-alpha-0 has been labeled as alpha for the past 5 months. So far I haven't run into any issues; maybe it can be marked as stable and released as 2.0.0? Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.