Skip to content

An opinionated filter for Broccoli that compiles handlebars templates for ember.js

License

Notifications You must be signed in to change notification settings

stefanpenner/broccoli-ember-hbs-template-compiler

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

broccoli-ember-hbs-template-compiler

Build Status

An opinionated filter for Broccoli that compiles handlebars templates for ember.js

Installation

npm install --save-dev broccoli-ember-hbs-template-compiler

Usage Example

module.exports = function (broccoli) {
  var templateCompiler = require('broccoli-ember-hbs-template-compiler')
  var pickFiles = require('broccoli-static-compiler')

  function preprocess (tree) {
    tree = templateCompiler(tree);
    return tree
  }

  var sourceTree = broccoli.makeTree('js');
  var templates = pickFiles(sourceTree, {
    srcDir: '/templates',
    destDir: '/templates'
  })
  var appTemplates = preprocess(templates);
  return [appTemplates];
}

What file types does it work with?

It's opinionated so you get both .hbs and .handlebars extensions out of the box

What should I look out for?

It requires the destination directory name be templates (as shown in the above example)

About

An opinionated filter for Broccoli that compiles handlebars templates for ember.js

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%