Commit 702b7014 authored by Yoelis Acourt's avatar Yoelis Acourt

chore: setup pre-commit hook

parent 3ab0ce9e
Pipeline #7053 passed with stages
in 11 minutes and 45 seconds
3ab0ce9ebc2b62ae09099e9d037e953f8ba252cf
purs-tidy check "src"
if [ $? -ne 0 ]; then
echo "purs tidy check failed. Please fix the issues before committing."
exit 1
fi
...@@ -24,10 +24,9 @@ ...@@ -24,10 +24,9 @@
spago-bin.spago-0_93_37 spago-bin.spago-0_93_37
#purescript #purescript
#spago-unstable #spago-unstable
nodePackages.purs-tidy
esbuild esbuild
nodejs nodejs
watchexec
pscid
nodePackages.npm nodePackages.npm
]; ];
...@@ -45,6 +44,16 @@ ...@@ -45,6 +44,16 @@
npm spago build -w --then browserify npm spago build -w --then browserify
''; '';
setup-gitblame = pkgs.writeShellScriptBin "setup-gitblame" ''
set -e
if git config --get blame.ignoreRevsFile > /dev/null; then
echo "blame.ignoreRevsFile is already set."
else
git config blame.ignoreRevsFile .git-blame-ignore-revs
echo "blame.ignoreRevsFile has been set to .git-blame-ignore-revs."
fi
'';
build-zephyr = pkgs.writeShellScriptBin "build-zephyr" '' build-zephyr = pkgs.writeShellScriptBin "build-zephyr" ''
set -e set -e
...@@ -157,6 +166,7 @@ ...@@ -157,6 +166,7 @@
self.packages.${system}.test-ps self.packages.${system}.test-ps
self.packages.${system}.repl self.packages.${system}.repl
setup-gitblame
build-watch build-watch
build-zephyr build-zephyr
minify-bundle minify-bundle
......
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
"@babel/preset-react": "~7.24.1", "@babel/preset-react": "~7.24.1",
"@getgauge/cli": "~1.4.0", "@getgauge/cli": "~1.4.0",
"esbuild": "~0.21.1", "esbuild": "~0.21.1",
"husky": "^9.1.7",
"parcel": "~2.8.2", "parcel": "~2.8.2",
"process": "^0.11.10", "process": "^0.11.10",
"react-testing-library": "~8.0.1", "react-testing-library": "~8.0.1",
...@@ -7428,6 +7429,21 @@ ...@@ -7428,6 +7429,21 @@
"node": ">= 6" "node": ">= 6"
} }
}, },
"node_modules/husky": {
"version": "9.1.7",
"resolved": "https://registry.npmjs.org/husky/-/husky-9.1.7.tgz",
"integrity": "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==",
"dev": true,
"bin": {
"husky": "bin.js"
},
"engines": {
"node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/typicode"
}
},
"node_modules/iconv-lite": { "node_modules/iconv-lite": {
"version": "0.6.3", "version": "0.6.3",
"license": "MIT", "license": "MIT",
......
...@@ -20,7 +20,8 @@ ...@@ -20,7 +20,8 @@
"server-ssl": "ssl-serve --ssl dist", "server-ssl": "ssl-serve --ssl dist",
"test": "spago test", "test": "spago test",
"dev": "concurrently \"npm run watch\" \"npm run serve\" ", "dev": "concurrently \"npm run watch\" \"npm run serve\" ",
"serve": "npx parcel serve --dist-dir ./dist/dev/bundle ./dist/dev/index.html" "serve": "npx parcel serve --dist-dir ./dist/dev/bundle ./dist/dev/index.html",
"prepare": "husky"
}, },
"dependencies": { "dependencies": {
"@fontsource/crete-round": "~5.0.12", "@fontsource/crete-round": "~5.0.12",
...@@ -75,6 +76,7 @@ ...@@ -75,6 +76,7 @@
"@babel/preset-react": "~7.24.1", "@babel/preset-react": "~7.24.1",
"@getgauge/cli": "~1.4.0", "@getgauge/cli": "~1.4.0",
"esbuild": "~0.21.1", "esbuild": "~0.21.1",
"husky": "^9.1.7",
"parcel": "~2.8.2", "parcel": "~2.8.2",
"process": "^0.11.10", "process": "^0.11.10",
"react-testing-library": "~8.0.1", "react-testing-library": "~8.0.1",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment