Giter Site home page Giter Site logo

middleman-ember's Introduction

Middleman::Ember

Adds Ember assets to a Middleman project. Support for production version of Ember when building.

Installation

Add this line to your application's Gemfile:

gem 'middleman-ember'

And then execute:

$ bundle

Or install it yourself as:

$ gem install middleman-ember

Usage

Add the following code to your config.rb file:

activate :ember

Set the production variant in your build configuration:

configure :build do
  set :ember_variant, :production
end

By default, the gem uses handlebars-source and ember-source for the Ember assets. If you want to have specific gem versions of ember or handlebars or to add ember-data specify those in your Gemfile, e.g:

gem "handlebars-source", "~> 1.0.0.rc6"
gem "ember-source", "~>1.0.0.rc6"
gem "ember-data-source", "~> 0.13"

If you want to use a local version of ember, ember-data or handlebars, set that in the configuration, i.e.

activate :ember do |ember|
  ember.ember_path      = "/path/to/ember_js/dist"
  ember.ember_data_path = "/path/to/ember_data/dist"
  ember.handlebars_path = "/path/to/handlebars/dist"
end

There are also 2 helpers that expose the asset paths of the ember assets used, namely:

  • ember_asset_path
  • handlebars_asset_path

These are useful if you're using the middleman-jasmine gem to allow you to add the ember and handlebars assets to another sprockets instance. e.g.:

after_configuration do
  jasmine_sprockets.append_path(ember_asset_path)
  jasmine_sprockets.append_path(handlebars_asset_path)
end

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

middleman-ember's People

Contributors

mrship avatar porada avatar tdreyno avatar pwnall avatar

Watchers

Jorge Villalobos avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.