1.0.0 • Published 7 years ago
@team-griffin/lerna-scope v1.0.0
lerna-scope
Run scoped commands within lerna packages
This 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 testthis is the equivalent to writing
cd ../../
yarn lerna --scope=my-package exec yarn test
cd packages/my-packageInstallation
npm i -g @team-griffin/lerna-scopeUsage
You can pass any valid lerna command and it will use it:
lerna-scope run someScript
lerna-scope exec someCommand
lerna-scope add someDependencyif 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 testPrerequesits
- 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 amodeflag - By default, we assume your packages live in a
packagesdirectory. If you want to point to a different locaiton, you must provide adirflag
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.
1.0.0
7 years ago