Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/timakin/sprint-rails
Module to integrate Sprint.js to Ruby on Rails Asset Pipeline.
https://github.com/timakin/sprint-rails
Last synced: about 1 month ago
JSON representation
Module to integrate Sprint.js to Ruby on Rails Asset Pipeline.
- Host: GitHub
- URL: https://github.com/timakin/sprint-rails
- Owner: timakin
- License: mit
- Created: 2015-04-27T11:55:52.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-04-28T07:08:58.000Z (over 9 years ago)
- Last Synced: 2024-10-06T02:06:36.884Z (about 1 month ago)
- Language: Ruby
- Size: 141 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
Sprint-rails
===============Integrate [Sprint.js](https://github.com/bendc/sprint), 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:
```ruby
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](https://github.com/bendc/sprint)
*In original case, Sprint's syntax is like this:
```
$("div").addClass("new").append("Hi Sprint
");
```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("Hi Sprint
");
```## Contributing
1. Fork it ( https://github.com/[my-github-username]/sprint-rails/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