Closed zertosh closed 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.
:+1:
Just so I'm clear, the following will still work in 4.x correct?
var b = browserify({ cache: {}, packageCache: {} });
var w = watchify(b);
@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.
@zertosh What's the upshot of that -- will watchify.args
be sticking around in some form?
@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:{}}
.
@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.
Closing this out for now since things still need to be figured out in browserify regarding path matching.
Before closing out 3.x:
4.0.0:
Essentially some form of https://github.com/substack/watchify/pull/202#issuecomment-93072063.This will bring the semantics of ignoring inline with browserify.watchify.args
(see https://github.com/substack/watchify/pull/204). Sharing caches is a bad idea for most users. Turning off the cache, or using your own cache will be an opt-in.