gulp-auto-emblem

0.1.3 • Public • Published

gulp-auto-emblem NPM version Build status

This is a gulp plugin to process Emblem.js templates specifically for Ember with plain module.
Modified from gulp-ember-emblem.

Usage

First, install gulp-auto-emblem:

npm install gulp-auto-emblem

Then, add it to your gulpfile.js:

var autoEmblem = require('gulp-auto-emblem');
 
gulp.task('templates', function(){
  gulp.src(['client/templates/*.emblem'])
    .pipe(autoEmblem())
    .pipe(gulp.dest('build/templates/'));
});

gulp-auto-emblem outputs a raw Ember.Handlebars.template function, so it is likely that you will want to use gulp-ember-emblem to make the handlebars template available via a specific namespace or for use with a module system. For additional usage examples, we recommend that you visit gulp-ember-emblem.

Default template name is chosen from the file name. For example index.index.emblem -> index/index

Options

rootPath

Type: String

Specify the path to your template folder. This is only used when registering the template names.
For example if your template is at the path app/templates/posts/teaser.emblem and app/templates is set as your root then the template's name will be posts/teaser

compilerOptions

Type: Object

Compiler options to pass to Emblem.precompile().

Package Sidebar

Install

npm i gulp-auto-emblem

Weekly Downloads

2

Version

0.1.3

License

MIT

Last publish

Collaborators

  • indream