Junior::Rails
junior-rails
packages awesome Junior front-end framework files and integrates it into Rails apps.
Currently only works in Rails 3.1+ with asset pipeline enabled
Installation
Add this line to your application's Gemfile:
gem 'junior-rails'
And then execute:
$ bundle
Usage
After installing the gem, add Junior assets to your manifest files:
# application.js
//= require junior_manifest
OR in case if don't want to include certain files (let's say you already have modernizr
in your app), you can require files individually:
# application.js
//= require modernizr.custom.15848
//= require zepto.min
//= require zepto.flickable.min
//= require lodash.min
//= require backbone-min
//= require junior
Junior CSS files
# application.css
/*...
*= require junior_manifest
*/
OR require individually:
# application.css
/*...
*= require ratchet
*= require junior
*/
Acknowledgements
Heavily influenced by jquery-rails
Contributing
- If any of libraries in
vendor/assets
is out of date, feel free to put in a pull request with new version of the library. - Since
junior.js
version is not stated clearly, JUNIOR_VERSION
constant in version.rb
is SHA1 hash of junior.js
. It can be calculated using sha1_version_generator.rb
located in the root of the gem:
ruby sha1_version_generator.rb vendor/assets/javascripts/junior.js
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request