Introducing the gulp command

From now on we work with .pug files for templates.
This commit is contained in:
2017-07-13 18:26:54 +02:00
parent fca78faca0
commit f6df37ec24
3 changed files with 144 additions and 0 deletions

19
gulp Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash -ex
GULP=./node_modules/.bin/gulp
function install() {
npm install
touch $GULP # installer doesn't always touch this after a build, so we do.
}
# Rebuild Gulp if missing or outdated.
[ -e $GULP ] || install
[ gulpfile.js -nt $GULP ] && install
if [ "$1" == "watch" ]; then
# Treat "gulp watch" as "gulp && gulp watch"
$GULP
fi
exec $GULP "$@"