Guard で CoffeeScript ファイルを JS ファイルにコンパイルしてから、Juicer でそれらをマージして縮小しようとしています。ディレクトリを使用してtmp
、中間 JS ファイルを保存します。私が理解していることから、これは機能するはずですが、機能しません:
guard :coffeescript, :input => "src/coffee", :output => "tmp"
guard :shell do
watch %r{^tmp/.+\.js$} do
system 'juicer', 'merge', 'tmp/app.js', '-sfo', 'js/app.js'
end
end
CoffeeScript ファイルは、アクセスされるtmp
たびにディレクトリに正しくコンパイルされますが、shell
ガードは起動しません。
ガードを起動し--debug
、JS ファイルの 1 つをtmp
手動で変更すると、ターミナルにデバッグ行が表示されません。これらのファイルは監視されていないようです。
$ guard --debug
18:53:51 - DEBUG - Command execution: which notify-send
18:53:51 - DEBUG - Command execution: emacsclient --eval '1' 2> /dev/null || echo 'N/A'
18:53:51 - INFO - Guard is using TerminalTitle to send notifications.
18:53:51 - DEBUG - Command execution: hash stty
18:53:51 - DEBUG - Guard starts all plugins
18:53:51 - DEBUG - Hook :start_begin executed for Guard::CoffeeScript
18:53:51 - DEBUG - Hook :start_end executed for Guard::CoffeeScript
18:53:51 - DEBUG - Hook :start_begin executed for Guard::Shell
18:53:51 - DEBUG - Hook :start_end executed for Guard::Shell
18:53:51 - INFO - Guard is now watching at '/home/tobia/my_project'
18:53:51 - DEBUG - Start interactor
[1] guard(main)>
/home/tobia/my_project/tmp
^^^この時点でJS ファイルを変更しても、何も起こりません。
私はDebian安定版のRuby 1.9.1、Guard 1.8.2、およびGuard-shell 0.5.1をインストールして使用していますsudo gem install