Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Guard::CoffeeScript compiles or validates your CoffeeScripts automatically when files are modified.

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Guardfile
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 Rakefile
Octocat-spinner-32 guard-coffeescript.gemspec
README.rdoc

Guard::CoffeeScript

CoffeeScript guard allows to automatically & intelligently compile your CoffeeScripts when files are modified.

  • Tested on Ruby 1.8.7 & 1.9.2.

Install

Please be sure to have guard installed before continue.

Install the gem:

gem install guard-coffeescript

Add it to your Gemfile (inside test group):

gem 'guard-coffeescript'

Add guard definition to your Guardfile by running this command:

guard init coffeescript

Dependencies

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.

Usage

Please read guard usage doc

Guardfile

CoffeeScript guard can be really be adapated to all kind of projects. Please read guard doc for more info about Guardfile DSL.

Standard ruby gems

guard 'coffeescript' do
  watch('^coffeescripts/(.*)\.coffee')
end

Rails app

guard 'coffeescript', :output => 'public/javascripts/compiled' do
  watch('^app/coffeescripts/(.*)\.coffee')
end

Development

Pull requests are very welcome! Make sure your patches are well tested.

Authors

Michael Kessler

Kudo

Many thanks to Thibaud Guillaume-Gentil for creating the excellent guard gem.

Something went wrong with that request. Please try again.