Gem for using Chaplin.js with Rails asset pipeline, based on chaplin-rails boilerplate project.
Since Chaplin requires module system this gem has
requirejs-rails gem
in dependecy. Those, you're forced to use requirejs
for your project :)
Gem already comes with underscore.js
and backbone.js
.
Add this line to your application's Gemfile:
gem 'chaplin-on-rails', git: 'git://github.com/eicca/chaplin-on-rails.git'
And then execute:
$ bundle
Run
rails g chaplin:install
It should create basic application structure with some basic files. To learn more about this see chaplin-rails.
This gem generates new application.js.coffee
for you, so you should
migrate your old application.js
to requirejs
config file and remove
application.js
file.
Also, there might be a problem with replacing requirejs_include_tag
.
Just follow for generator's output instructions.
- Write tests for install generator.
- Write generators for scaffold/resource/controller/model.