Sha256: 43465bbaa03321b777a30ff2916e49009a2cee2b82fe06dc2373af25cf842db3

Contents?: true

Size: 1.9 KB

Versions: 2

Compression:

Stored size: 1.9 KB

Contents

# Ember::Middleman

[![Build Status](https://travis-ci.org/tricknotes/ember-middleman.png?branch=master)](https://travis-ci.org/tricknotes/ember-middleman)
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/tricknotes/ember-middleman/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

ember-middleman supports using Ember.js with Middleman in easily.
You can use this with [hamlbars](https://github.com/jamesotron/hamlbars) if you like.

_This gem is inspired by [ember-rails](http://github.com/emberjs/ember-rails)._

## Installation

Add this line to your application's Gemfile:

``` ruby
gem 'ember-middleman'
gem 'ember-source', '1.0.0.rc5' # the version you requires
```

Execute:

``` sh
$ bundle
```

Or install it yourself as:

``` sh
$ gem install ember-middleman
```

## Features

When you installed ember-middleman, the following features help you.

### Path to libraries

You can use Ember.js, handlebars and ember-data.
Please write the followings to your `application.js` (or something you use):

_You should require jQuery before require ember_.

``` javascript
//= require handlebars
//= require ember
//= require ember-data
```

### handlebars compilation

You can use handlebars as your template language for Ember.js.

``` sh
$ mkdir -p source/javascripts/templates
```

And put your template.

For example:

* `source/javascripts/templates/ok_button.js.handlebars`

``` handlebars
<div>
  <button {{action someAction}}>OK</button>
</div>
```

It automatically set as `Ember.TEMPLATES['ok_button']`.

### Generator

You can generate a fresh project already setup for ember:

``` ruby
# Gemfile

source 'https://rubygems.org'

gem 'middleman'
gem 'ember-middleman'
```

``` sh
$ bundle exec middleman init . --template=ember
```

## Tests

``` sh
bundle exec rake
```

## Known issues

* Many code are duplicated with ember-rails

## Example Repository

* [sapporojs.org](https://github.com/sapporojs/sapporojs.org)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ember-middleman-0.0.3 README.md
ember-middleman-0.0.2 README.md