shelljs / shx

Portable Shell Commands for Node
MIT License
1.73k stars 45 forks source link

Support executables #124

Closed mfulton26 closed 6 years ago

mfulton26 commented 6 years ago

I'd like to be able to add something like the following to my package.json:

  "scripts": {
    "test": "jest --projects remote-*.config.js"
  }

This doesn't work on Windows though so I found shx but when I replace the script with "shx jest --projects remote-*.config.js" I get "jest is not a command".

I'd like to be able to use bash-like file pattern matching in my npm scripts. Could support be added to shx to run executable binaries as commands such as jest?

Thank you.

nfischer commented 6 years ago

Duplicate of #68.

To get this working, we really need to make an alternative API for exec(). I started a proof of concept in shelljs/shelljs#524 and now I'm trying to focus more time on finishing it. A goal for the alternative is to glob by default--when that happens, we'll update shx and add the new command to the whitelist.