Permalink
Browse files

added grunt support

  • Loading branch information...
mbuchetics committed Jan 22, 2014
1 parent d2ca0c2 commit cb303f2014daa2d49ffc09fb3cbcee7a8517baf7
Showing with 19 additions and 0 deletions.
  1. +19 −0 bin/compile
View
@@ -110,6 +110,25 @@ status "Building runtime environment"
mkdir -p $build_dir/.profile.d
echo "export PATH=\"\$HOME/vendor/node/bin:\$HOME/bin:\$HOME/node_modules/.bin:\$PATH\";" > $build_dir/.profile.d/nodejs.sh
+# Check and run Grunt
+(
+ if [ -f $build_dir/grunt.js ] || [ -f $build_dir/Gruntfile.js ] || [ -f $build_dir/Gruntfile.coffee ]; then
+ # get the env vars
+ if [ -d "$env_dir" ]; then
+ status "Exporting config vars to environment"
+ export_env_dir $env_dir
+ fi
+
+ # make sure that grunt and grunt-cli are installed locally
+ run_npm "install grunt-cli"
+ run_npm "install grunt"
+ echo "-----> Found Gruntfile, running grunt heroku:$NODE_ENV task"
+ $build_dir/node_modules/.bin/grunt heroku:$NODE_ENV
+ else
+ echo "-----> No Gruntfile (grunt.js, Gruntfile.js, Gruntfile.coffee) found"
+ fi
+)
+
# Post package.json to nomnom service
# Use a subshell so failures won't break the build.
(

0 comments on commit cb303f2

Please sign in to comment.