0.0.1 • Published 12 years ago
ember-template-middleware v0.0.1
Ember template compiler middleware.
##Features
- Render ember templates in node js as middleware
- Outputs AMD and Ember.TEMPLATEobjects
##Requires
##What can I do with this?
To activate middleware require ember-template-compiler and then configure.
var compiler = require('ember-template-compiler');A simple setup will look something like:
app.use(compiler.middleware({
	src: 	 	__dirname + '/handlebars',
	dest: 	 	__dirname,
	format:		'AMD'
}));- src: Hbs file folder. Do not include- __dirnameif origin not defined, REQUIRED
- dest: Output destination. Do not include- __dirnameif origin not defined, REQUIRED
- origin: Origin directory, DEFAULT: false
- force: Force compile, DEFAULT: false
- format: Output format. Either- 'AMD'or- null.- nulloutputs an- Ember.TEMPLATESproperty
- namePrefix: Prefix for template name
- pathInName: Include path in name, DEFAULT: true
If the origin is defined. src and dest will be relative to it.  
app.use(compiler.middleware({
	src: 	 	'/js/app/handlebars',
	dest: 	 	'/js/app/templates',
	origin:  	'/var/www/frontend/public',
	namePrefix: 'app/templates',
	format:  	'AMD',
	force: 		true
}));License
Copyright © 2013 Jim Hall
Licensed under the MIT License
0.0.1
12 years ago