@holomodules/core-build-tools v1.0.0
@holonis/core-build-tools
A package that brings in standard CLI tools and npm scripts for backend projects.
Usage
In a project that wants the standard build tools we need to include this package in the development dependencies in package.json. From the command line we can issue this command:
npm install --save-dev @holonis/core-build-tools'Which will add the dependency to the package.json like so:
...
"devDependencies": {
"@holonis/core-build-tools": "^1.0.0"
}
...To enable the scripts from this package in your project add something like this to your package.json:
...
"scripts": {
"lint": "hol_lint",
"lint:ci": "hol_lint_ci",
"test": "hol_coverage",
"test:ci": "hol_coverage_ci",
}
...Once you have used npm install to bring in all the dependencies, you can use:
npm testWhich will run all of the tests in your project by looking for all files with names matching *.test.js in the test folder or any subfolder of the test folder.
You can run the lint check using:
npm run lintWhich will check all files matching *.js in either the src or test folder and all of their subfolders.
There are also CI commands:
npm run test:ciand
npm run lint:ciWhich do run tests and linting for the CI server but also produce output files which can be used when troubleshooting builds on the CI server.
Possible upcoming improvements
- We are investigating whether this module can also supply the git-hook functionality in order to further decrease the needed for complex setup in each project.
- We are also looking into whether we can add publishing or release script support in this module for the same reason.
6 years ago