Skip to content

Instantly share code, notes, and snippets.

@jefmathiot
Created September 13, 2012 11:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jefmathiot/3713877 to your computer and use it in GitHub Desktop.
Save jefmathiot/3713877 to your computer and use it in GitHub Desktop.
Watch for changes on coffeescript files in the current directory and use GruntJS to compile to JS.
#!/bin/bash
# Watch for changes on coffeescript files in the current directory and use GruntJS to compile to JS.
# See http://gruntjs.com
# Require inotify-tools
# Ubuntu : apt-get install inotify-tools
while true ; do \
inotifywait -q *.coffee \
&& ( grunt coffee > /dev/null ) \
done
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
coffee: {
app: {
src: ['./*.coffee'],
dest: './'
}
}
});
// Load tasks from "grunt-sample" grunt plugin installed via Npm.
grunt.loadNpmTasks('grunt-coffee');
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment