UNPKG

388 BJavaScriptView Raw
1var watchify = require("watchify");
2
3module.exports = function(b, bundleShare){
4 var w = watchify(b);
5
6 var obj = {
7 addFactorBundle:function(output){
8 w.plugin("factor-bundle", { outputs:output() });
9 return obj;
10 }
11 , startWatching:function(fileStream){
12 w.on("update", function(d){
13 bundleShare(w, fileStream);
14 });
15 }
16 }
17
18 return obj;
19}