gulp-beman
v0.1.0
Published
Translate bemzen templates based on BEM named class structure
Downloads
3
Readme
gulp-beman
Translate beman templates based on BEM named class structure
Install
$ npm install --save-dev gulp-beman
Usage
var gulp = require('gulp'),
beman = require('gulp-beman');
gulp.src('./src/*.html')
.pipe(beman({
elemPrefix: '__',
modPrefix: '_',
modDlmtr: '_'
}))
.pipe(gulp.dest('./dist'));
You can also use Beman with another template engine, e.g. Jade
Here is an example of such use:
jade template
div(block='animals')
div(elem='rabbit' mod='type:scurrying, color:white')
div(elem='dormouse' mod='type:sleeper, color:red')
guplfile.js
gulp.task('jade', function () {
return gulp.src(path.src.jade)
.pipe(jade({
pretty: true
}))
.pipe(gulp.dest('app/src/'));
});
gulp.task('html',['jade'], function () {
return gulp.src(path.src.html)
.pipe(beman({
elemPrefix: '__',
modPrefix: '_',
modDlmtr: '_'
}))
.pipe(gulp.dest(path.build.html));
});
License
MIT