Sprint-rails
Integrate Sprint.js, a high-performance, minimal, and simple substitute of jQuery to Asset pipeline of your Rails App.
Installation
Add this line to your application's Gemfile:
gem 'sprint-rails'
And then execute:
$ bundle install
After that, you need to make sprint.js available on your pages. To do that, you can add it to your application.js file, like this:
//= require sprint
Usage
Just as same as jQuery, you can use like following. If you'd check in detail, visit the original github repo of Sprint.js
*In original case, Sprint's syntax is like this:
$("div").addClass("new").append("<p>Hi Sprint</p>");
But if you try to integrate it with Rails or existing jQuery apps, you have to use "Sprint" instead of "$" like this:
Sprint("div").addClass("new").append("<p>Hi Sprint</p>");
Contributing
- Fork it ( https://github.com/[my-github-username]/sprint-rails/fork )
- 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 a new Pull Request