To get started with the repo:
$ git clone git@github.com:lerna/lerna.git && cd lerna
$ npm installCurrently, the source is split up into a few categories:
- Utilities: methods to run git, npm, fs, and more.
- Abstractions for packages
- Lerna Commands: each command has an
initializeandexecutefunction.- These commands are exposed in src/index.js and run in the
bin/lerna.jsscript
- These commands are exposed in src/index.js and run in the
In order to run the tests:
$ npm testOr the linter:
$ npm run lintIf you want to test out Lerna on local repos:
$ npm run build
$ npm linkThis will set your global lerna command to the local version.
Note that Lerna needs to be built after changes are made. So you can either run
npm run build to run it once, or you can run:
$ npm run devWhich will start a watch task that will continuously re-build Lerna while you are working on it.
If you would like to check test coverage, run the coverage script, then open coverage/lcov-report/index.html in your favorite browser.
$ npm run coverage
$ xdg-open coverage/lcov-report/index.html