Add gulp buildpack.

This commit is contained in:
Simo Kinnunen
2014-07-30 17:48:51 +09:00
parent 378cf0af46
commit 05549ce32a
4 changed files with 64 additions and 1 deletions

View File

@@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -e # fail fast
set -o pipefail # don't ignore exit codes when piping output
# set -x # enable debugging
# Configure directories
build_dir=$1
cache_dir=$2
env_dir=$3
bp_dir=$(cd $(dirname $0); cd ..; pwd)
# Load some convenience functions like status() and indent()
source $bp_dir/bin/common.sh
# Expose user-installed bower
export PATH=$build_dir/node_modules/.bin:$PATH
# Get gulp version
gulp_bin=$(which gulp)
status "Using Gulp from ${gulp_bin#$build_dir/}"
gulp -v 2>&1 | indent
# Run subsequent node/gulp commands from the build path
cd $build_dir
status "Building"
gulp build 2>&1 | indent