*`:valid_extensions => %w{js coffee}` to only trigger `run_on_change` events for files with these extensions. Forces Guard to re-run all tests when any other matched file changes.
## Using with Rails 3.1 and the Asset Pipeline and/or Jammit
Use [`guard-rails-assets`](https://github.com/dnagir/guard-rails-assets) chained in before `guard-jasmine-headless-webkit` to precompile your application
code for testing:
guard 'rails-assets' do
watch(%r{^app/assets/javascripts/.*})
end
guard 'jasmine-headless-webkit' do
watch(%r{^public/assets/.*\.js})
... specs ...
end
Do the same for Jammit, using [`guard-jammit`](http://github.com/guard/guard-jammit).
### `guard-jammit` and Jammit >= 0.6.0
Jammit >= 0.6.0 changed how it determines the Rails environment. Use [my fork of `guard-jammit`](http://github.com/johnbintz/guard-jammit) until it's fixed upstream.
and mash them all together with [Jammit](https://github.com/documentcloud/jammit) for use in my apps. Feel free to change that, it's your `Guardfile` after all.
Or, try it. It's easy to do in your `assets.yml` file: