Angular Mono Repo Starter
An Angular mono repository starter kit featuring Jest
, Lerna
, Compodoc
, scss-bundle
and ng-packagr
.
Jest
, Lerna
, Compodoc
and ng-packagr
provide.To get started, you need to:
git clone https://github.com/alan-agius4/ng-mono-repo-starter.git <project_name>
cd <project_name>
npm install
Note: There is a postinstall
script that after npm install
has finished will bootstrap the mono repo.
It is recommanded that you use scoped npm packages. This is set to @speedy
by default. To change it you need to modify a couple of files.
These are:
tsconfig.json
tsconfig.build.json
lerna.json
jest.config.js
Task | Description |
---|---|
aio | Generates a static documentation of your libraries |
bootstrap | Install packages dependencies and bootstrap the mono repo |
build | Build all the packages inside the mono repo |
watch | Build all the packages inside the mono repo and perform an incremental build when a file changes (NB: in case you have cross dependencies it's recommanded that you first perform a build) |
build-tools | Build the tools script that are used for building the mono repo |
clean | Clean up packages node_modules and dist folders |
test | Run unit and integration tests |
test-debug | Run unit and integration tests in debug mode |
test-tdd | Run unit and integration tests in watch mode |
release | Runs lerna publish |
For this project, I chose Jest as our test framework. While Karma is probably more common for Angular testing, Karma is slower and doesn't offer some important features that Jest does.
Debugging is one of the places where VS Code really shines over other editors. This project comes pre-configured launch.json
. All you need to do is hit F5
in VS Code
and get debugging!