documentcloud / jammit

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

Option to include external assets from a URL #138

Closed rapheld closed 13 years ago

rapheld commented 13 years ago

Include URLs in the asset groups with the option to 1> pull them in locally and cache them or 2> just add them as a separate link tag in the header.

Example assets.yml

:javascripts
  :workspace
    - public/javascripts/somefile.js
    - http://maps.google.com/maps/api/js
    - http://some.domain.com/core.js
vandrijevik commented 13 years ago

I am curious, why would you even need jammit for option 2?

rapheld commented 13 years ago

If you are using some external asset that is frequently updated, you may wish to forgo caching it to insure the latest version is always being used. Option #2 would allow you to do this while being able to centralize js/css includes in the assets.yml file.