Guard::CoffeeScript compiles you CoffeeScripts automatically when files are modified.
Tested on Ruby 1.8.7 & 1.9.2.
Please be sure to have guard installed before continue.
Install the gem:
gem install guard-coffeescript
Add it to your Gemfile (inside test group):
Add guard definition to your Guardfile by running this command:
guard init coffeescript
Since CoffeeScripts is no more a Ruby gem it cannot be installed with Bundler, so you have to install it on your own. Please consult the CoffeeScript documentation for more information about how to install the latest CoffeeScript version.
Please read guard usage doc
CoffeeScript guard can be adapated to all kind of projects. Please read guard doc for more info about Guardfile DSL.
guard 'coffeescript' do watch('^coffeescripts/(.*)\.coffee') end
There following options can be passed to the CoffeeSCript Guard:
The guard detects by default nested directories and creates these within the output directory. The detection is based on the match of the watch regular expression:
that has been detected by the watch
with an output directory of
will be compiled to
Pull requests are very welcome! Make sure your patches are well tested.