gb-lerna/schematics
Some schematics for creating and maintaining a Lerna monorepo with Typescript.
gb-lerna cli.
Rather than using these schematics directly you might like to use theInstallation
npm install -g lerna @angular-devkit/schematics-cli @gb-lerna/schematics
Create a new monorepo
mkdir sample-project
cd sample-project
schematics @gb-lerna/schematics:repo --packageName @sample/website --no-independent
schematics @gb-lerna/schematics:package --name @sample/api
schematics @gb-lerna/schematics:package --name @sample/admin
schematics @gb-lerna/schematics:module --name lol --packageName @sample/admin
lerna bootstrap
lerna add @sample/api --scope=@sample/website
lerna add @sample/api --scope=@sample/admin
npm install
npm run format
npm test -- --coverage
Add another package to your project
cd your-app
schematics gb-lerna/schematics:package @sample/tools
Add a class or values module to your project
cd your-app
schematics gb-lerna/schematics:module math @sample/tools --kind values
Schematics
schematics gb-lerna/schematics: --list-schematics
schematic | purpose |
---|---|
eslint | add eslint to your project |
module | add a new class or values module to a package |
package | add a new package to your monorepo |
prettier | add prettier to your project |
repository (repo) | create a new monorepo project |