Use Broccoli to Compile Emblem Templates for Ember
Install plugin
npm install --save-dev broccoli broccoli-merge-trees broccoli-static-compiler broccoli-ember-emblem
And setup Brocfile.js:
var emblem = require('broccoli-ember-emblem')
var mergeTrees = require('broccoli-merge-trees')
var pickFiles = require('broccoli-static-compiler')
function preprocess (tree) {
tree = emblem(tree, {
stripPathFromName: 'tmpl/'
})
return tree
}
var tmplTree = 'client/tmpl'
tmplTree = pickFiles(tmplTree, {
srcDir: '/',
destDir: '/tmpl'
})
tmplTree = preprocess(tmplTree)
module.exports = mergeTrees([ /* other trees, */ tmplTree ])
Written by Jake Trent
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Js
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#