This project was generated with Angular CLI version 7.3.8.
This is a little playground to get Angular working with Jenkins as build server and SonarQube for static code analysis with code coverage reporting.
Here are the changes that were made to the standard angular-cli project:
- Prettier has been added with some additional tools:
npm i -D husky lint-staged prettier tslint-config-prettier prettier-check
- The
package.json
file has been updated with newtest:coverage
,lint
,lint:fix
andprettier
commands, and withhusky
,lint-staged
andprettier
configuration - The
tslint.json
file has been updated to extendtslint-config-prettier
- The
Jenkinsfile
file has been added with the Jenkins pipeline configuration - The
.editorconfig
file has been updated with Jenkinsfile configuration - The
is-ci
package has been added to detect whether we're running in a build environment or not - The
src/karma.conf.js
and thee2e/protractor.conf.js
files have been updated to make tests run successfully in a Docker container - The
karma-sonarqube-reporter
has been added to record test execution data in SonarQube's format - The
src/karma.conf.js
file has been updated to record test execution data when running tests with coverage reporting - The
README.md
file has been updated with Jenkins and SonarQube badges - The
sonar-project.properties
file has been added with Sonar Scanner configuration - The
src/app/app-routing.module.spec.ts
file has been added to achieve 100% test coverage
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.