
Compiles your mustache templates with hogan.js on sprockets and the Rails asset pipeline.
HoganAssets is a gem that compiles mustache templates using hogan.js on sprockets and the Rails asset pipeline. Hogan.js is a templating engine developed at Twitter that follows the mustache spec and compiles the templates to JavaScript. This gem allows for server-side compilation of mustache templates using the asset pipeline/sprockets.
gem 'hogan_assets'
bundle install
//= require hogan.js
require_tree in your JavaScript manifest file://= require_tree ./templates
Note: Templates are named based on their sub-path from the manifest file. For example, if your template is located at app/assets/javascripts/templates/pages/person.mustache, it will be named templates/pages/person.
gem 'hogan_assets'
bundle install
Hamstache is a combination of haml and mustache. To use hamstache, follow these additional steps:
gem 'hamstache'
bundle install
Slimstache is a combination of slim and mustache. To use slimstache, follow these additional steps:
gem 'slimstache'
bundle install
HoganAssets is a gem that allows for the compilation of mustache templates using hogan.js on sprockets and the Rails asset pipeline. It provides compatibility with mustache templating as well as integration with the asset pipeline/sprockets. Other combinations such as hamstache (haml + mustache) and slimstache (slim + mustache) are also supported.
