1
我想在任何.js
文件更改(built.js
除外)时运行requirejs优化脚本。Ruby Guard忽略文件
我看到有一个忽略方法。我在Gaurdfile
(这导致无限循环)中有以下内容。
guard 'shell', :ignore => 'built.js' do
watch(/script\/(.*).js/) { `node r.js -o build.js` }
end
我的问题是:如何配置我的Guardfile
忽略文件built.js
?
如果你只是完全想忽略built.js,把它放在文件的顶部(可能带有过滤器),就像你在文档中看到的那样:https://github.com/guard/guard/wiki/Guardfile -例子 。有关过滤器的更多信息(仅考虑.js文件),请参阅此处的文档:https://github.com/guard/guard#filter。有关guard-shell的语法,请参阅https://github.com/guard/guard-shell – RobM