Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/team-griffin/lerna-scope
Run scoped commands within lerna packages
https://github.com/team-griffin/lerna-scope
Last synced: about 1 month ago
JSON representation
Run scoped commands within lerna packages
- Host: GitHub
- URL: https://github.com/team-griffin/lerna-scope
- Owner: team-griffin
- License: mit
- Created: 2018-06-05T14:26:36.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-06-05T15:34:22.000Z (over 6 years ago)
- Last Synced: 2024-04-14T05:52:53.795Z (9 months ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lerna-scope
Run scoped commands within lerna packagesThis is a super simple tool that lets you run scripts from within a package
## Example
```
# we're currently in "project/packages/my-package"
lerna-scope test
```
this is the equivalent to writing
```
cd ../../
yarn lerna --scope=my-package exec yarn test
cd packages/my-package
```## Installation
```
npm i -g @team-griffin/lerna-scope
```## Usage
You can pass any valid lerna command and it will use it:
```
lerna-scope run someScript
lerna-scope exec someCommand
lerna-scope add someDependency
```
if you don't provide a lerna command, it will assume you want to do `exec yarn`. For example:
```
lerna-scope test
# equivalent to
lerna-scope exec yarn test
```## Prerequesits
- You must be using lerna in your project (obviously)
- By default, we use the locally-installed lerna (i.e. `yarn lerna ...`). If you want to use a globally installed version, you must provide a `mode` flag
- By default, we assume your packages live in a `packages` directory. If you want to point to a different locaiton, you must provide a `dir` flag## Flags
### mode
`'local' | 'global'`
Whether to use a local installation of lerna or a global one. Set to `local` by default.### dir
`string`
The directory that your packages live in. `packages` by default.