Socket
Book a DemoInstallSign in
Socket

ember-template-middleware

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-template-middleware

Ember template compiler middleware.

latest
Source
npmnpm
Version
0.0.1
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Ember template compiler middleware.

##Features

  • Render ember templates in node js as middleware
  • Outputs AMD and Ember.TEMPLATE objects

##Requires

  • mkdirp
  • ember-template-compiler

##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 __dirname if origin not defined, REQUIRED
  • dest: Output destination. Do not include __dirname if origin not defined, REQUIRED
  • origin: Origin directory, DEFAULT: false
  • force: Force compile, DEFAULT: false
  • format: Output format. Either 'AMD' or null. null outputs an Ember.TEMPLATES property
  • 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

Keywords

Ember.js

FAQs

Package last updated on 21 Aug 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts