Files
schemastore/Makefile
Gerry Ferdinandus cbfcc17f80 add: grunt task 'local_coverage' (#2095)
* Add: 'js-beautify' and 'c8' in package.json

And update other package to the latest version.

* eslint must ignore generated "schema.json.translated.to.js"

* .gitignore must ignore src/temp

This directory will be autogenerated by make file "coverage"

* add: grunt task 'local_coverage'

This task will can be called via the makefile
And generate a HTML report files stored in 'src/temp/coverage/report/index.html'
2022-02-20 19:26:17 +01:00

30 lines
978 B
Makefile

.PHONY: build remote maintenance coverage
build: # Run the local build process
cd src && \
npm install && \
npm run build
git diff-index --quiet HEAD -- || { \
echo "ERROR: Dirty repository found"; \
git status --porcelain; \
exit 1; }
remote: # Run the remote build process
cd src && \
npm install && \
npm run remote
maintenance: # Run the maintenance check
cd src && \
npm install && \
npm run maintenance
# For a specific schema, generate a coverage report in src/temp/coverage/report/index.html
# Example: via 'make' to generate coverage report for schema-catalog.json
# make coverage schema=schema-catalog.json
coverage: # generate HTML coverage report
cd src && \
npx c8 --temp-directory temp/coverage -x 'Gruntfile.js' grunt local_coverage --SchemaName=$(schema) && \
npx c8 --temp-directory temp/coverage report -r html -o temp/coverage/report -x 'Gruntfile.js' && \
echo "Full HTML report files stored in 'src/temp/coverage/report/index.html'"