0.0.5 • Published 5 years ago
lerna-runner v0.0.5
lerna-runner 🏃
A CLI for running node scripts in monorepo packages.
Getting Started
Install it
yarn add -D lerna-runner
Add the script
Add the script to your package.json.
{
"scripts": {
"runner": "lerna-runner"
}
}
Run it
yarn runner
FAQs
Why is it not finding my packages?
lerna-runner
looks for theworkspaces
key in your rootpackage.json
file and then searches your workspaces for directories containing their ownpackage.json
files. Make sure you have defined yourworkspaces
inside of your rootpackage.json
file.{ "workspaces": [ "apps/*", "packages/*" ], }
- **Why is it not finding any scripts?**
After using the `workspaces` entry to find your packages and you select a package, `lerna-runner` extracts and displays a list of that packages `scripts` from its `package.json`. Make sure you have `scripts` defined in the package's `package.json` file.