gulp-bem / gulp-bem-xjst

DEPRECATED repository, moved to https://github.com/bem/gulp-bem/tree/master/packages/gulp-bem-xjst
MIT License
6 stars 3 forks source link
bem bem-xst gulp gulp-plugin

gulp-bem-xjst

DEPRECATED repository, moved to mono repository gulp-bem

Compile bemhtml templates into JavaScript

Requirements

Install

$ npm install gulp-bem-xjst

Usage

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'});"

API

bem-xjst engines accesible via properties bemhtml and bemtree:

var engine = require('gulp-bem-xjst')[engine];

Plugin options

License

MIT