Merge JS plugin
Plugin details
Documentation
ruby script/plugin install http://sbecker.net/shared/plugins/merge_js/
=== Components
* Rake Task for merging and compressing javascript files.
* Helper function for including these javascript files in your RHTML.
* YAML configuration file for mapping javascript files to merged versions.
* Rake Task for auto-generating the YAML file from your existing javascript files.
1. Run the rake task "generate_js_yml" to generate the /config/js.yml file the first time. You will need to reorder files under 'base' so dependencies are loaded in correct order. Feel free to rename or create new file collections.
Example with multiple merged files:
--- source_map: - rails_base: - prototype - effects - controls - dragdrop - app_lib: - application - foo - bar current_version: "20060603144038"
2. Run the rake task "merge_js" to generate the merged javascript files.
3. Use the helper function whenever including these files in your application.
Example:
<%= javascript_include_merged 'prototype', 'effects', 'controls', 'dragdrop', 'application' %>
Now supports symbols and :defaults as well:
<%= javascript_include_merged :defaults %> <%= javascript_include_merged :foo, :bar %>
Further Documentation
There is currently no advanced documentation for this plugin.
New documentationEdit plugin | Back in time (2 older versions) | Last edited by: Guest, over 5 years ago

