copyleftconf-website/gulp/tasks/browserify.js
2016-02-27 17:23:35 -06:00

17 lines
406 B
JavaScript

/**
* Dependencies
*/
const path = require('path');
const browserify = require('browserify');
const babelify = require('babelify');
const source = require('vinyl-source-stream');
/**
* Module body / Expose
*/
module.exports = (entry, config) => {
config = config || {};
const built = browserify(entry)
.transform(babelify);
return built.bundle().pipe(source(path.basename(entry)));
};