Skip to content

Commit ad28483

Browse files
committed
Run test at push
Use `simple-git-hooks`. # Conflicts: # Makefile
1 parent a1891bd commit ad28483

2 files changed

Lines changed: 15 additions & 107 deletions

File tree

package-lock.json

Lines changed: 9 additions & 107 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
"description": "C-compiler for wasm",
55
"main": "index.js",
66
"scripts": {
7+
"prepare": "simple-git-hooks",
78
"start": "npm run default",
89
"default": "npm run build-assets && npx vite --port=3000",
910
"build-assets": "make assets",
11+
"test": "npm run lint && make test && (which llvm-ar>/dev/null; [[ $? -ne 0 ]] || make test-wcc)",
1012
"lint": "eslint src/wcc/www/**/*.ts",
1113
"lint:fix": "eslint --fix src/wcc/www/**/*.ts",
1214
"release": "npx vite build",
@@ -21,6 +23,9 @@
2123
"engines": {
2224
"node": ">=20.0"
2325
},
26+
"simple-git-hooks": {
27+
"pre-push": "npm test"
28+
},
2429
"devDependencies": {
2530
"@types/alpinejs": "~3.13.11",
2631
"@types/node": "~22.14.1",
@@ -29,6 +34,7 @@
2934
"@typescript-eslint/parser": "~8.30.1",
3035
"commander": "~13.1.0",
3136
"sass": "~1.86.3",
37+
"simple-git-hooks": "^2.13.1",
3238
"ts-node": "~10.9.2",
3339
"vite": "~6.3.1"
3440
},

0 commit comments

Comments
 (0)