1.0.1 • Published 7 years ago

run-bin v1.0.1

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

run-bin - Launch node_modules/.bin scripts in parent projects

Overview

Designed for use in monorepos where your devDependencies are installed in a parent directory to your individual packages.

Allows you run tools in node_modules/.bin in the parent project (such as the typescript compiler or mocha) without having to install them globally or for each individual package.

Usage

For each individual package in your monorepo, add run-bin as a devDependency

npm install --save-dev run-bin

Then simply add run-bin to the start of your script definitions in package.json to allow them to utilise devDependencies installed at the top-level of youe monorepo (or any node_modules folder above that!)

  "scripts": {
    "build": "run-bin tsc",
    "test": "run-bin mocha"
  }

This package also includes the functionality available in cross-env so you can also pass environment variables to your processes as shown below:

  "scripts": {
    "build": "run-bin NODE_ENV=production webpack",
  }

Acknowledgements

Based on the awesome work by these fine folks:

License

MIT

1.0.1

7 years ago

1.0.0

7 years ago

0.0.1

7 years ago