diff options
| author | Ruben Beltran del Rio <jj@r.bdr.sh> | 2025-12-22 11:29:53 +0100 |
|---|---|---|
| committer | Ruben Beltran del Rio <jj@r.bdr.sh> | 2025-12-22 11:54:50 +0100 |
| commit | f29b392c6b68b7db98f5d6921ea588b559435f35 (patch) | |
| tree | 4b475215124ddc5efca8fa70cee49b9e67529abf /Makefile | |
Initial implementation1.0.0
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0107a07 --- /dev/null +++ b/Makefile @@ -0,0 +1,53 @@ +WIKIDIR ?= ../../vendor/wiki +default: wiki + +prepare: + @pnpm install + @cd $(WIKIDIR) && pnpm install + +# Code Quality + +test: + node --test + +coverage: + node --test --experimental-test-coverage + +lint: prepare + @pnpm exec eslint ./src --fix + +format: lint + @pnpm exec prettier ./src --write + +# Development + +build: prepare + @pnpx esbuild src/wmap.js --bundle --outfile=client/wmap.js + +watch: + @nodemon -e js,html,css -i client/wmap.js --exec make build + +wiki: build + @cd $(WIKIDIR) && node index.js --data ./data --security_legacy + +link: + @pnpm link + @cd $(WIKIDIR) && pnpm link wiki-plugin-wmap + +# Deployment + +release: + @pnpm publish + +# Auditing + +sbom: + @trivy fs -q --format cyclonedx --scanners vuln,license --output sbom.json . + +vulnerabilities: sbom + @sbom-utility vulnerability list -q --input-file sbom.json + +licenses: sbom + @sbom-utility license list -q --input-file sbom.json + +.PHONY: default prepare test coverage format lint release ci link wiki build watch |