capistrano-plugins / capistrano-faster-assets

Skips asset compilation if none of the assets were changed since last release.
MIT License
187 stars 38 forks source link

should recompile after 'config.action_controller.asset_host' changes #11

Closed qhwa closed 9 years ago

qhwa commented 9 years ago

if config.action_controller.asset_host changes to another host, we should recompile assets.

rhomeister commented 9 years ago

I might be mistaken, but this is only true if you have .erb files that contain a reference to the asset_host.

qhwa commented 9 years ago

You are right @rhomeister However it is common to refer images in the css or scss (scss.erb likely) files.

for example:

/** file: app/assets/application.scss.erb **/
.some.class { background: url(<%= image_url 'my-logo' %>) }

file is ignored for compiling if only asset_host config changes.

rhomeister commented 9 years ago

OK, clear. The problem with .erb files in general is that they might or might not remain unchanged after recompilation. It is outside the scope of this gem to analyse code in order to detect this. I am going to close this issue, but feel free to reopen if you have new insights.