mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-06-21 22:31:46 +00:00
chore: apply prettier on the entire project
This commit is contained in:
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
HOOKS_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
GIT_HOOKS_DIR="$(git rev-parse --show-toplevel)/.git/hooks"
|
||||
|
||||
cp "$HOOKS_DIR/pre-commit" "$GIT_HOOKS_DIR/pre-commit"
|
||||
# cp "$HOOKS_DIR/pre-push" "$GIT_HOOKS_DIR/pre-push"
|
||||
chmod +x "$GIT_HOOKS_DIR/pre-commit" "$GIT_HOOKS_DIR/pre-push"
|
||||
# chmod +x "$GIT_HOOKS_DIR/pre-push"
|
||||
|
||||
echo "Git hooks installed."
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
echo "Running format..."
|
||||
npm run format
|
||||
|
||||
# Re-stage files that format modified so the commit includes the formatted output.
|
||||
git diff --name-only | while read -r file; do
|
||||
git add "$file"
|
||||
done
|
||||
|
||||
echo "[SKIPPED] Running lint..."
|
||||
# npm run lint
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
echo "Running build..."
|
||||
npm run build
|
||||
Reference in New Issue
Block a user