Make sure you have
yarn
installed.
The project use husky and lint-staged for linting and fixing possible errors on source code before commit
Git hooks scripts are installed after running yarn install
the first time
Compile typescript files from the src
folder inside the build
folder.
Remove the following directories/files
- build
- reports
Run tests files inside the tests
folder that matches the following patterns. Exit with code > 0 on error
- *.test.ts
- *.spec.ts
The same as yarn test
and generates an xunit
report in reports/test-results.xml
. Always exit with 0 code
The same as as yarn test
and generates coverages reports in reports/coverage
. Exit with code > 0 on error
The same as yarn test:xunit
and yarn cover
combined. Exit with code 0 always
Check tslint errors according to tslint.json
The same as yarn lint
and generates a checkstyle report in reports/lint-checkstyle.xml
Run yarn lint
applying fixes and run prettier on every typescript file
Generate a tarball containing the npm package. It can be published via npm publish
.
The package is generated using the src
folder as the package root. The main
entry in the package.json
is updated accordingly.
Check for:
- Build errors
- Tests failures
- Lint errors
Run test and generate every possible report. Do not exit with error code > 0 if the tests fail. It generates a report file instead
- reports/lint-checkstyle.xml Lint report in chackstyle format
- reports/test-results.xml Test report in xUnit format
- reports/coverage/clover.xml Coverage report in clover format
- reports/coverage/cobertura-coverage.xml Coverage report in cobertura format
- reports/coverage/lcov.info Coverage report in lcov
- reports/coverage/index.html Coverage report in html
- Bump
package.json
version accordingly to the commit messages - Generate changelog for the new version from the commit messages
- Commit
package.json
andCHANGELOG.md
with the new changes - Create a git tag with the new version
- You'll need to execute
git push --follow-tags origin master
after generating a release