This package provides Angular CLI builders for the Stryker Mutator framework and Google Cloud deployments.
Easily integrate the Stryker Mutator framework for mutation testing into your Angular app(s).
- Install Stryker and the necessary plugins for your Angular app
npm i -D stryker stryker-api stryker-typescript stryker-jest-runner
- Install stryker builder
npm i -D @clipchamp/ng-builders
- Add custom architect config to your angular.json
[...]
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": ["src/tsconfig.json", "src/tsconfig.spec.json"],
"exclude": ["**/node_modules/**"]
}
},
"mutate": {
"builder": "@clipchamp/ng-builders:stryker",
"options": {
"configPath": "....", // path is relative to the project folder or workspace root (both are checked)
"mutator": "typescript",
[...]
}
},
[...]
You can either pass a configuration file through the options object in the architect or configure Stryker directly there.
Depending on how you called your architect you need to change this command.
ng run my-app:mutate
Easily deploy your Angular application to Google App Engine.
- Install gcloud builder
npm i -D @clipchamp/ng-builders
- Add custom architect config to your angular.json
[...]
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": ["src/tsconfig.json", "src/tsconfig.spec.json"],
"exclude": ["**/node_modules/**"]
}
},
"deploy": {
"builder": "@clipchamp/ng-builders:gcloud",
"options": {
"browserTarget": "project:build", // target build (same as ng serve's browserTarget)
"yamlFilePath": "...", // path to your app.yaml file
"applicationName": "...", // name of the application service that is deployed
"deployConfigPath" "...", // optional: path to a deploy config script that exposes before and after deploy hooks
[...]
}
},
[...]
You can either pass a configuration file through the options object in the architect or configure it through the before deploy hook.
Depending on how you called your architect you need to change this command.
ng run my-app:deploy