Skip to content

Allows the download of remote assets (JS/CSS) to a local cache so that they can be aggregated with Drupal 7's aggregation feature.

License

Notifications You must be signed in to change notification settings

donut/drupal-asset_saver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Asset Saver

A Drupal 7 module that provides the ability to save remote JavaScript and CSS files locally so that they can be minified and aggregated using Drupal's aggregation feature.

Usage

Just pass a URL to asset_saver_url_to_file() and it will download and save the file locally, returning the Drupal URI to the file. This URI can easily be passed to drupal_add_js() or drupal_add_css().

Example

drupal_add_js(asset_saver_url_to_file('http://example.com/best_lib_ever.js')
             ,array('scope'      => 'header'
                   ,'group'      => JS_LIBRARY
                   ,'every_page' => true));

About

Allows the download of remote assets (JS/CSS) to a local cache so that they can be aggregated with Drupal 7's aggregation feature.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages