Skip to content
This repository has been archived by the owner on Mar 25, 2018. It is now read-only.

gulp-bem/gulp-bem-xjst

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

  • String exportName — Engine handler's variable name. Default — BEMHTML.
  • String engine — Engine's name. Default — BEMHTML.
  • String extension — extension for file. Default — .${engine}.js.

License

MIT