node package manager
We need your input. Help make JavaScript better: Take the 2017 JavaScript Ecosystem survey »

gulp-bem-js-pack

gulp-bem-js-pack experimental

NPM version Build Status

Packing CommonJS modules with respect of levels of definition.

If you pass file with same ID twice to module, it will require first module by it ID from second.

// base/first.js (with ID `first`) 
module.exports = 'BASE';
 
// first.js (with ID `first`) 
var First = require('first'); // returns 'BASE' 
module.exports = First + '!';

Usage

var gulp = require('gulp');
var bempack = require('gulp-bem-js-pack');
 
gulp.src(['base/*.js', 'main/*.js']).pipe(gulp.dest('dist'));

API

bempack.pack([options])

Wrapper around browser-pack that takes stream of BEM objects

License

MIT (c) 2014 Vsevolod Strukchinsky