Jasmine-headless-webkit,带防护(1.0.0)和 Rails 3.2;资产编译真的很慢
基本上,当我保存文件(coffeescript)时,guard 会编译资产,然后运行与该文件相关的测试。此资源编译可能需要大约 20 秒。 Guard 打印以下内容:
Compiling rails assets with Guard::RailsAssets::RailsRunner.
rm -rf /Users/me/work/proj/public/assets
Assets compiled.
我刚刚升级了所有内容,在旧系统上,测试几乎立即运行。我不知道在哪里寻找解决减速问题的方法。
我正在使用:
- guard(1.0.0)
- guard-jasmine-headless-webkit(0.3.2)
- guard-rails-assets(0.1.3)
- rails(3.2.1)
- jasmine(1.1.2)
- jasmine-headless-webkit (0.8.4)
以前,我使用的是:
- guard(0.6.2)
- guard-jasmine-headless-webkit(0.3.2)
- Guard-rails-assets(0.0.7)
- rails(3.1.0)
- jasmine(1.0.2.1)
- jasmine-headless-webkit(0.8.0)
我的guardfile有以下内容:
group 'frontend' do
guard 'rails-assets' do
watch('config/application.rb')
watch(%r{^app/assets/javascripts/.*\.(js|coffee)$})
end
guard 'jasmine-headless-webkit', :full_run => false, :all_on_start => false do
watch('spec/javascripts/support/jasmine.yml') { |m| "spec/javascripts" }
watch(%r{^app/assets/javascripts/(.*)\.(js|coffee)$}) do |m|
# Don't run tests if there was a failure compiling the JS
if Dir["public/assets/editor.js"].any?
specific_file = newest_js_file("spec/javascripts/#{m[1]}")
all_tests = "spec/javascripts"
specific_file or all_tests
end
end
watch(%r{^spec/javascripts/.*\.(js|coffee)$})
end
end
这种减速正在扼杀我的流量。如果您需要更多信息,请告诉我。
Basically, when I save a file (coffeescript), guard compiles the assets then runs the test(s) relating to the file. This asset compile can take ~20 seconds. Guard prints the following:
Compiling rails assets with Guard::RailsAssets::RailsRunner.
rm -rf /Users/me/work/proj/public/assets
Assets compiled.
I just upgraded everything, and on the old system, the tests ran almost instantly. I'm not sure where to look to fix the slowdown.
I'm using:
- guard (1.0.0)
- guard-jasmine-headless-webkit (0.3.2)
- guard-rails-assets (0.1.3)
- rails (3.2.1)
- jasmine (1.1.2)
- jasmine-headless-webkit (0.8.4)
Previously, I was using:
- guard (0.6.2)
- guard-jasmine-headless-webkit (0.3.2)
- guard-rails-assets (0.0.7)
- rails (3.1.0)
- jasmine (1.0.2.1)
- jasmine-headless-webkit (0.8.0)
My guardfile has the following:
group 'frontend' do
guard 'rails-assets' do
watch('config/application.rb')
watch(%r{^app/assets/javascripts/.*\.(js|coffee)$})
end
guard 'jasmine-headless-webkit', :full_run => false, :all_on_start => false do
watch('spec/javascripts/support/jasmine.yml') { |m| "spec/javascripts" }
watch(%r{^app/assets/javascripts/(.*)\.(js|coffee)$}) do |m|
# Don't run tests if there was a failure compiling the JS
if Dir["public/assets/editor.js"].any?
specific_file = newest_js_file("spec/javascripts/#{m[1]}")
all_tests = "spec/javascripts"
specific_file or all_tests
end
end
watch(%r{^spec/javascripts/.*\.(js|coffee)$})
end
end
This slowdown is killing my flow. If you need anymore info, let me know.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论