Skip to content
This repository was archived by the owner on Apr 16, 2025. It is now read-only.

Commit 77c3e39

Browse files
committed
feat: add git pre-push hook
This is the hook I use to minify and commit the files for index.html
1 parent 8f95d87 commit 77c3e39

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

pre-push.githook

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/sh
2+
3+
# This is the pre-push hook used to ensure that JS and CSS files
4+
# are minified and committed to the repo for the index.html file.
5+
# If you want to bundle your scripts (once modified) just run this
6+
# in the gitbash.
7+
8+
### REQUIRED
9+
# Please run
10+
# `npm install gulp gulp-concat gulp-minify gulp-clean-css gulp-strip-css-comments`
11+
# before trying to run this.
12+
13+
# Bundle the JS and CSS files
14+
node_modules/.bin/gulp
15+
echo "Made dist files... Committing them before push"
16+
git add dist/
17+
git commit -m "Update dist files"
18+
echo "Added dist files to new commit"

0 commit comments

Comments
 (0)