0.01
No commit activity in last 3 years
No release in over 3 years
Emblem support for middleman
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

Middleman::Emblem

A simple plugin to support emblem with Middleman

Inspired by https://github.com/GutenYe/middleman-ember-template

A great template but we wanted to add slim/haml style support for ember templates.

Built around the Emblem JS project: https://github.com/machty/emblem.js

Full Project Generation

Check out my other project (mes) which will build a full scaffold for a middleman/ember/emblem project.

Installation

Add this line to your application's Gemfile:

gem 'middleman-emblem'

And then execute:

$ bundle

Or install it yourself as:

$ gem install middleman-emblem

Usage

add activate :emblem to config.rb

Configuration

by default: activate :emblem, emblem_dir: "templates", emblem_ext: "emblem", ignore: true, ember:true, object: "Ember.TEMPLATES"

ignore: true means it will ignore the "templates" folder when building

but this can be changed in config.rb to something like: activate :emblem, emblem_dir: "templates_slim", emblem_ext: "slim", ignore: false

ignore: false means you need to explicity ignore the "templates" folder in your config.rb when building

To use without Ember, set ember: false and choose an object in which to store precompiled templates, e.g. object: "App.Templates"

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