node package manager
Stop wasting time. Easily manage code sharing in your team. Create a free org »

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