1
0
mirror of https://github.com/locomotivemtl/locomotive-boilerplate.git synced 2026-01-15 00:55:08 +08:00

3 Commits

Author SHA1 Message Date
Lucas Vallenet
41f44e30fc Move hook to script/git folder 2023-06-13 10:49:03 +02:00
Lucas Vallenet
9e8330cdb4 Add prestart script 2023-06-12 16:54:57 +02:00
Lucas Vallenet
1ffcf3f099 test 2023-06-08 13:04:31 +02:00
3 changed files with 19 additions and 2 deletions

View File

@@ -1,3 +1,3 @@
{
"version": 1686214653663
"version": 1686222202916
}

View File

@@ -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",

16
scripts/git/pre-commit Normal file
View File

@@ -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