This extension is hosted on github. If you have git installed, then
cd to the root of your radiant project and issue the following commands:
git clone git://github.com/nelstrom/radiant-asset_packager-extension.git vendor/extensions/asset_packager
This extension includes the Rails asset packager as a git submodule, so change to the asset_packager directory, and issue the following commands:
cd vendor/extensions/asset_packager git submodule init git submodule update
Change back to the root directory for your Radiant site, and run the update rake task for this extension.
cd ../../.. rake radiant:extensions:asset_packager:update
There are no migrations, so there is no need to run the
rake radiant:extensions:asset_packager:migrate task.
This extension offers 4 new tags:
sources, and generates a
cache="true" the sources can be merged into a single
all.js file. This functionality is enabled when
ActionController::Base.perform_caching is set to
true, which is the default in production environment, but not in development environment.
e.g. the following:
would generate code:
?1263122757 which is appended to the end of the files is created from the file's timestamp.
If you choose to use the
a rake task to generate the minified and bundled asset package:
This extra step could be added to your deployment script with an after hook.