Rails assets:precompile only one asset?

微笑、不失礼 提交于 2019-12-05 18:23:59
Said Kaldybaev

i also had such a question, googled a lot and found one gem called: guard-rails-assets

It compiles the assets within Rails 3.1 application whenever those change.

For example, you can do this:

# compile ONLY when something changes
guard 'rails-assets', :run_on => :change do
  watch(%r{^app/assets/.+$})
end

Check it out

I think no and unneccessary because all js files are compiled to one file as and css files. If you changed only one file - you changed such combined files. But, if you want to update resource file such as images, I think, you may, only place it in right directory under public/accets

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!