@gb-lerna/schematics
v2.8.0
Published
[![TypeScript](https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.svg)](http://www.typescriptlang.org/) [![latest](https://img.shields.io/npm/v/@gb-lerna/schematics/latest.svg)](https://npmjs.com/package/@gb-lerna/schematics)
Downloads
61
Maintainers
Readme
gb-lerna/schematics
Some schematics for creating and maintaining a Lerna monorepo with Typescript.
Rather than using these schematics directly you might like to use the gb-lerna cli.
Installation
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 |