如何让 Guard 自动编译我的 Coffeescript 文件?说是但不是

How do I get Guard to automatically compile my Coffeescript file? Says it is but it's not

我有以下 Guardfile

coffeescript_options = {
 input: 'src/js',
 output: 'www/js',
 patterns: [%r{^src/js/(.+\.(?:coffee|coffee\.md|litcoffee|js))$}]
}

guard 'coffeescript', :input => 'src/js', :output => 'www/js' do
  coffeescript_options[:patterns].each { |pattern| watch(pattern) }
end

# guard 'coffeescript', :input => 'src/js', :output => 'www/js'

我保存 src/js/tf.coffee 文件并记录此

02:46:50 - INFO - Compile src/js/tf.coffee
02:46:50 - INFO - 02:46:50 AM Successfully generated
←]2;[CoffeeScript results] Successfully generated

但是,我到处都找不到该文件。

$ find . -name tf.js
$ ls www/js
app.js

它适用于 HAML。这是 Ruby 应用程序,而不是 Rails。 (实际上是 PhoneGap。)我尝试了 Guardfile 中的注释行,但它无法识别文件的更改。我在 Windows 8.1。我安装了 Node v5.4.0。我可以 运行 coffee -o www/js src/js/tf.coffee 并且它可以生成 JS 文件。

文档:https://github.com/netzpirat/guard-coffeescript

糟糕,我不得不将 guard 行更改为

guard 'coffeescript', coffeescript_options do

我已经更改它以尝试简化它,但忘记将其更改回来。仍然不确定为什么注释掉的行不起作用。