browserify / watchify

watch mode for browserify builds
Other
1.79k stars 181 forks source link

Ship 4.0.0 #207

Closed zertosh closed 9 years ago

zertosh commented 9 years ago

Before closing out 3.x:

4.0.0:

zertosh commented 9 years ago

@jmm I think the 4.x line will be the last one before the row biz is figured out. So 5.0 is hopefully where we reconcile browserify + watchify + module-deps w.r.t. to the row api.

mattdesl commented 9 years ago

:+1:

Just so I'm clear, the following will still work in 4.x correct?

var b = browserify({ cache: {}, packageCache: {} });
var w = watchify(b);
zertosh commented 9 years ago

@mattdesl It will. But it I can't actually get rid of having to pass a { cache: {}, packageCache: {} } somehow into browserify like I wanted in https://github.com/substack/watchify/pull/204#issuecomment-93529664.

jmm commented 9 years ago

@zertosh What's the upshot of that -- will watchify.args be sticking around in some form?

zertosh commented 9 years ago

@jmm The cache object gets passed to module-deps when a pipeline is created (grep mopts). By the time watchify is applied to browserify, a pipeline already exists. So I'd have to dig into b.pipeline get module-deps, and modify its options object. Not cool.

But we need some form of watchify.args that creates new cache objects - like your PR. Though, that kinda sucks because if someone keeps using watchify.args, it won't break - it'll just silently not cache. Unless we do something like:

watchify.args = function() {
  return { cache: {}, packageCache: {} };
};
xtend(watchify.args, watchify.args());

But if users have to change from watchify.args to watchify.args() (or something else), maybe we should leave it as it. Instead change the documentation here, gulp, etc. to explicitly pass {cache:{}, packageCache:{}}.

jmm commented 9 years ago

@zertosh Ok, thanks, I figured that's what the issue was. I posted some ideas in https://github.com/substack/watchify/pull/204#issuecomment-94877114.

zertosh commented 9 years ago

Closing this out for now since things still need to be figured out in browserify regarding path matching.