added precommit hook

This commit is contained in:
Djeeberjr 2023-07-30 23:33:51 +02:00
parent db50a93512
commit da3f00acb6
3 changed files with 21 additions and 1 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
/build /build
/node_modules /node_modules
/dump

View File

@ -55,3 +55,7 @@ emulator:
.PHONY: webconsole .PHONY: webconsole
webconsole: webconsole:
node console.js node console.js
.PHONY: format
format:
haxelib run formatter -s src

15
pre-commit.sh Executable file
View File

@ -0,0 +1,15 @@
#!/usr/bin/env sh
# Run:
# ln -s ../../pre-commit.sh .git/hooks/pre-commit
set -e
# format
make format
# build
make build