diff --git a/assets.json b/assets.json index 57d6ccd9..f6545974 100644 --- a/assets.json +++ b/assets.json @@ -1,3 +1,3 @@ { - "version": 1686214653663 + "version": 1686222202916 } \ No newline at end of file diff --git a/package.json b/package.json index d0993890..6583ba6b 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,8 @@ }, "scripts": { "start": "node --experimental-json-modules --no-warnings build/watch.js", - "build": "node --experimental-json-modules --no-warnings build/build.js" + "build": "node --experimental-json-modules --no-warnings build/build.js", + "prestart": "cp scripts/git/pre-commit .git/hooks/ && chmod +x .git/hooks/pre-commit" }, "dependencies": { "locomotive-scroll": "^4.1.4", diff --git a/scripts/git/pre-commit b/scripts/git/pre-commit new file mode 100644 index 00000000..0bc23729 --- /dev/null +++ b/scripts/git/pre-commit @@ -0,0 +1,16 @@ +#!/bin/sh + +BOLD='\033[1m' +NONE='\033[00m' + +echo "${BOLD}>> Pre-commit —${NONE} Build 🏗️" + +git stash -q --keep-index + +npm run build + +status=$? + +git stash pop -q + +exit $status