Moved to Poetry for dependency management
[pillar-svnman.git] / gulp
1 #!/bin/bash -ex
2
3 GULP=./node_modules/.bin/gulp
4
5 function install() {
6     npm install
7     touch $GULP  # installer doesn't always touch this after a build, so we do.
8 }
9
10 # Rebuild Gulp if missing or outdated.
11 [ -e $GULP ] || install
12 [ gulpfile.js -nt $GULP ] && install
13
14 if [ "$1" == "watch" ]; then
15     # Treat "gulp watch" as "gulp && gulp watch"
16     $GULP
17 fi
18
19 exec $GULP "$@"