Skip to content

icholy/ember-handlebars-brunch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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://[email protected]: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');

About

Ember Handlebars integration for Brunch

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CoffeeScript 59.6%
  • JavaScript 40.4%