gulp-ember-autolocalization

0.0.3 • Public • Published

gulp-ember-autolocalization

This is a gulp plugin to process to add localization helper to handlebars template.

Usage

First, install gulp-ember-autolocalization:

npm install gulp-ember-autolocalization

Then, add it to your gulpfile.js and pass localization helper name to function:

var autoLocalization = require('gulp-ember-autolocalization');

gulp.task('templates', function(){
  gulp.src(['client/templates/*.hbs'])
    .pipe(autoLocalization('loc'))
    .pipe(gulp.dest('build/templates/'));
});

gulp-auto-localization outputs a raw Ember.Handlebars.template with localization helper added to text

helperName

Type: String

Specify your helper name while calling the function. Default value loc will be taken if nothing is passed.

##Example input

<div>hello {{isHello}}</div>

##Example output Assuming helper passes is loc

<div>{{loc 'hello'}} {{isHello}}</div>

Package Sidebar

Install

npm i gulp-ember-autolocalization

Weekly Downloads

1

Version

0.0.3

License

MIT

Last publish

Collaborators

  • vinay21feb