DEPRECATED repository, moved to mono repository gulp-bem
Compile bemhtml templates into JavaScript
$ npm install gulp-bem-xjst
var gulp = require('gulp');
var bemhtml = require('gulp-bem-xjst').bemhtml;
gulp.task('default', function () {
return gulp.src('page.bemhtml')
.pipe(bemhtml())
.pipe(gulp.dest('dist'));
});
$ node -p "require('./dist/page.bemhtml.js').apply({block: 'page'});"
bem-xjst engines accesible via properties bemhtml
and bemtree
:
var engine = require('gulp-bem-xjst')[engine];
- String exportName — Engine handler's variable name. Default —
BEMHTML
. - String engine — Engine's name. Default —
BEMHTML
. - String extension — extension for file. Default —
.${engine}.js
.