1.0.0 • Published 5 years ago

@holomodules/core-build-tools v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
5 years ago

@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 test

Which 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 lint

Which 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:ci

and

npm run lint:ci

Which 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.