Ember Handlebars plugin for gulp 3.
Deprecation Notice
This plugin is no longer maintained. You should consider replacing your usage with gulp-handlebars. Starting with gulp-handlebars 2.2.0, embers-handlebars is supported.
Usage
First, install gulp-ember-handlebars
as a development dependency:
npm install --save-dev gulp-ember-handlebars
Then, use the plugin in your gulpfile.js
:
var handlebars = ; gulp;
API
options.outputType
Type: String
Default: amd
The desired output type. One of the following:
browser
- Produce plain JavaScript files for the browser.amd
- Produce AMD modules.cjs
- Produce CommonJS modules.
options.templateRoot
Type: String
Default: templates
This option specifies the name of the root directory for template files.
options.namespace
Type: String
Default: Ember.TEMPLATES
This option is only necessary when options.outputType
is browser
. This
option's value is the namespace that is assigned the pre-compiled templates.
Use dot notation (e.g. 'Ember.Templates`) for nested namespaces.
options.processName
Type: Function
Default: Strip file extension
This option accepts a function which takes one argument (the template name) and returns a string which will be used as the key for the precompiled template object. By default, the filename minus the extension is used.
options.compilerOptions
Type: Object
Compiler options to pass to Ember.Handlebars.precompile()
.