0.01
No commit activity in last 3 years
No release in over 3 years
An easy way to get Marionette.js and Dust.js working together with the asset pipeline
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0

Runtime

>= 0
>= 1.2.9
>= 3.1
>= 2.0.3
>= 0
 Project Readme

Gem Version Dependency Status Build Status Code Climate

MarionetteDust - Rails

Provides full integration between Marionette.js (and dependencies), Dust.js and the Asset Pipeline, also includes generators for a typical marionette application.

Installation

Add marionette_dust to your gemfile:

gem 'marionette_dust'

Download and install by running:

$ bundle install

Initialize your app with:

$ rails generate md:install

This adds //= require marionette_dust in your application.js manifest and generates the basic scaffold for your marionette application:

app/
└── assets/
    └── javascripts/
        ├── apps/
        ├── entities/
        └── app.js

You can past an optional argument ( -c ) if you want coffeescript files.

Generators

All generators are based on marionette modules, the original idea is described in the excellent book Backbone.Marionette.js: A Gentle Introduction, and the all credits go to BackboneRails.com

  • Scaffold

    Generates a scaffold for a sub-app, under apps folder, running:

    $ rails generate md:scaffold Foo [-c]
    

    will generate:

app/
└── assets/
    └── javascripts/
        ├── apps/
        |    └── foo/
        |        └── foo_app.js
        └── entities/
            └── foo.js
  • Submodule

    Generates a submodule under an existent app (previously generated with the Scaffold generator), running:

    $ rails generate md:submodule bar --parent foo [-c]
    

    will generate:

app/
└── assets/
    └── javascripts/
        ├── apps/
        |    └── foo/
        |        ├── bar/
        |            ├── bar_view.js
        |            └── bar_controller.js
        |        └── foo_app.js
        └── entities/
        |    └── foo.js
        └── templates/
            └── foo/
                └── bar/
                    └── bar.jst.dust

About

This version includes:

  • Marionette.js v1.2.2
  • Dust.js v2.2.2

Also this project is inspired by:

Backbone on rails and Dust assets

Special thanks to @sauron for making the test suite possible

Contributing

  1. Fork it
  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 new Pull Request

githalytics.com alpha

Bitdeli Badge