Ember Handlebars integration for Brunch
CoffeeScript JavaScript
Switch branches/tags
Nothing to show
Pull request Compare This branch is 46 commits ahead, 3 commits behind saiwong:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
test
vendor
.gitignore
.npmignore
LICENSE
README.md
package.json
setup.js

README.md

Warning

I've stopped using ember and am no longer maintaining this repository. Support for this project will continue to be provided by bartsqueezy within the new ember-handlebars-brunch repo.

Ember Handlebars for Brunch

This plugin adds Ember Handlebars template pre-compiling to brunch, utilizing the latest and greatest EmberJS build (compatible with the new ember v3 router).

Usage

Add "ember-handlebars-brunch": "git+ssh://git@github.com:icholy/ember-handlebars-brunch.git". to package.json of your brunch app.

set the templates compiler in config.coffee set precompile to true if you want to enable it

templates:
  precompile: true  # default is false
  root: 'templates/'
  defaultExtension: 'hbs'
  joinTo: 'javascripts/app.js' : /^app/

place your handlebars templates in the app/templates/ directory and give them a .hbs extension

app/
  templates/
  application.hbs
    my_template.hbs
  subdir/
    another_template.hbs

the template name will be the path without the root

App.MyView = Ember.View.extend({
	templateName: 'my_template'
});

Also accessible through Ember.TEMPLATES

var anotherTemplate = Ember.TEMPLATES['subdir/another_template'];

If you wish to require the template, you have to use the full path

require('templates/application');