Sha256: ff696ed0888e3f1ea449c38b986ebef08754f8cc4d33dae2f81373239f63f663
Contents?: true
Size: 1.07 KB
Versions: 1
Compression:
Stored size: 1.07 KB
Contents
# AssetsLedger Keep track of JS/CSS dependencies and makes sure they are only included once. ## Installation Add this line to your application's Gemfile: ```ruby gem 'assets_ledger' ``` And then execute: ``` $ bundle ``` Or install it yourself as: ``` $ gem install assets_ledger ``` ## Usage ```ruby ledger = AssetsLedger::Ledger.new ledger.add_js('path/to/js') ledger.add_css('path/to/css') # You can add many dependencies at once ledger.add_js('/js/jquery.js', 'js/jquery.datatables.js') # or pass an array js_dependencies = ['/js/jquery.js', 'js/jquery.datatables.js'] ledger.add_js(js_dependencies) ``` if you use Rails you can generate the include tags by: ``` # In application.html.erb stylesheet_link_tag *ledger.css_dependencies # ... javascript_include_tag *ledger.js_dependencies ``` ## Contributing 1. Fork it ( https://github.com/trialbee/assets_ledger/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create a new Pull Request
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
assets_ledger-0.0.2 | README.md |