upbin
v0.9.2
Published
CLI helper to find and execute a executable file by walking up parent directories
Downloads
303
Readme
upbin
CLI helper to find and execute an executable file by walking up parent directories.
Why?
upbin
mainly focuses on module hoisting.
For example, Yarn workspaces and Lerna supports module hoisting.
module will hoist to top-level node_modules when it's using the same version of Babel.
./
node_modules/
.bin/
babel <- It can execute by upbin
packages/
some-pkg/ <- Current working directory
If you want to execute top-level bin in packages/some-pkg/package.json
:
{
"scripts": {
"prepare": "../../node_modules/.bin/babel ..."
}
}
It can be replaced with upbin!
"prepare": "upbin babel ..."
Install
npm i upbin
upbin requires Node.js >= 8
Usage
upbin [binName] [args...]
License
This package is released under the MIT license.