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

Would not compile other assets with config.assets.precompile directive #3

Open jgrannas opened 9 years ago

jgrannas commented 9 years ago

In my staging.rb environment file i was trying to precompile these files:

config.assets.precompile += ['admin/admin.css', 'admin/admin.js']

I had to remove the capistrano-faster-assets gem for this to work.

wioux commented 9 years ago

I had a similar problem and got it working by adding my additional files to the cap variable assets_dependencies. Here's what I did:

# in config/deploy.rb
set :assets_dependencies, fetch(:assets_dependencies) + Dir['engines/*/app/assets']
westonganger commented 9 years ago

Is there a proper fix for this?

TJM commented 9 years ago

Would it be reasonable to "read" the application configuration to retrieve that setting, rather than duplicate it in deploy.rb or deploy/staging.rb?

mattherick commented 9 years ago

@TJM +1

TJM commented 9 years ago

Not saying I know how to do that :grinning:, but if we could figure out how to "ask" the application for its asset directories, it would "DRY" it up a bit?

mattherick commented 9 years ago

Yes, that would be great!