gulp-browser/ts/modulebrowserify.ts
2015-10-26 23:27:33 +01:00

15 lines
540 B
TypeScript

/// <reference path="./index.ts" />
module GulpBrowserBrowserify {
export function init() {
return function() {
return through.obj((file, enc, cb) => { //this is the trough object that gets returned by gulpBrowser.browserify();
var bundleCallback = function(err, bufferedContent) {
file.contents = bufferedContent;
cb(null,file);
};
browserify(file)
.bundle(bundleCallback)
});
};
}
}