aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRuben Beltran del Rio <jj@r.bdr.sh>2026-04-12 16:48:43 +0200
committerRuben Beltran del Rio <jj@r.bdr.sh>2026-04-14 12:36:48 +0200
commitde62a5da0225b79fcf2460727bb7d765f8be2426 (patch)
tree042c7cf1ee26f333df2081e711dc99ba6b599bae /Makefile
Initial implementation
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile53
1 files changed, 53 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..b9a05f0
--- /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/causalloop.js --bundle --outfile=client/causalloop.js
+
+watch:
+ @nodemon -e js,html,css -i client/causalloop.js --exec make build
+
+wiki: build
+ @cd $(WIKIDIR) && node index.js --data ./data --security_legacy
+
+link:
+ @pnpm link
+ @cd $(WIKIDIR) && pnpm link wiki-plugin-causalloop
+
+# 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