source: main/waeup.kofa/branches/uli-diazo-themed/etc/grunt.sh.in @ 10957

Last change on this file since 10957 was 10938, checked in by uli, 11 years ago

Put bootstrap into layout dir.

File size: 688 bytes
Line 
1#!/bin/sh
2
3# A wrapper script to execute grunt commands in an environment where a
4# local version of nodejs and `grunt` is defined.
5#
6# To create a 'distribution' run: ``grunt dist``
7# To run tests do: ``grunt test``
8#
9OLD_PATH=`pwd`
10# prepend nodejs bin-dir on PATH
11PATH="${buildout:parts-directory}/nodejs/bin:$PATH"
12BOOTSTRAP_DIR=${buildout:directory}/layout/bootstrap/
13NPM=${buildout:parts-directory}/nodejs/bin/npm
14echo "Changing to $BOOTSTRAP_DIR"
15cd $BOOTSTRAP_DIR
16# reinstall grunt if neccessary...
17if [ ! -d node_modules ]; then
18  echo "grunt missing. Reinstalling..."
19  $NPM install -g grunt-cli
20  $NPM install
21fi
22# call `grunt` with all commandline args.
23grunt $*
24cd $OLD_PATH
Note: See TracBrowser for help on using the repository browser.