documentcloud / jammit

Industrial Strength Asset Packaging for Rails
http://documentcloud.github.com/jammit/
MIT License
1.16k stars 197 forks source link

Per-file compile settings #247

Open chrisvanpatten opened 11 years ago

chrisvanpatten commented 11 years ago

It'd be nifty if you could set per-file settings in your YML file. For example:

javascript_compressor: uglifier
compress_assets: on

javascripts:
  script:
    - vendor/javascripts/bootstrap/bootstrap.js
    - app/assets/javascripts/script.js
  payment:
    compress_assets: off
    - vendor/javascripts/jquery.payment/*.js
    - app/assets/javascripts/payment.js

I imagine this is possible now with multiple YAML config files, but I think it'd be cleaner if you could do this all in one place. Any setting at the file level would override a global setting, so there the script.js file inherits the global settings but payment.js will have its own compress_assets setting.

Just a thought!

justindarc commented 10 years ago

+1