gulp-ember-autolocalization
v0.0.3
Published
A small library which adds localization helper to handlebar templates
Downloads
1
Maintainers
Readme
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>