-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"fullPaths" optional again #160
Conversation
I think listening for |
Passes all the tests, seems to work! Released as 2.5.0 and I added you as a contributor on github and npm: https://gist.github.com/substack/e205f5389890a1425233 |
Thanks @substack! 😄 |
@zertosh @substack
module-deps sometimes emits |
@jmm wow pathmodify is pretty clever - I don't think this will affect it because once path
👍 - but is possible with labeled-stream-splicer to add new labels? Or would you have to re-create the whole pipeline?
I think step 2 should've have been pushed after the
Interesting. It shouldn't matter from a watchify perspective because the value of |
@zertosh thanks for the feedback.
Yeah, if the module-deps phase was labeled right now, I'd use that to be sure I'm inserting my stream directly after, although watchify or something else that comes after could do the same thing.
Yes, you can just label the stream you're adding (or streams that are already in the pipeline). In this case it would just be a matter of: b.pipeline.get('deps').push(through.obj(function(row, enc, next) {
...
}));
b.pipeline.get('deps').get(-1).label = 'watchify'; (I suggested a naming convention of Or you could assign the Then you could do
I was suggesting doing just one or the other: either transform just files with
Ok, sorry for the noise. |
Nah, I'm very happy that browserify and watchify are getting TLC 😄 |
Make fullPaths not required. This is basically following the same changes done to watchify in browserify/watchify#160
This diff makes
fullPaths
optional again. Instead of waiting forbrowserify
to emitdep
viaemit-deps
, we get therows
immediately afterdeps
- but not the entire row, just the parts that are relevant for caching. Sincemodule-deps
only cares aboutid
,source
,deps
andfile
from a cache perspective.This also fixes an issue whereby, after each re-build, every
.json
file would get an extramodule.exports=
prepended (see #152). This happened because cached files where being re-fed into the pipeline that had already been through thejson
step.It's also unnecessary to
fs.stat
each file. It is a given that arow
emitted bymodule-deps
has afile
property which corresponds to a file and that it exists.Disclaimer: I don't know if there was an obscure underlying reason that I might've missed for why
watchify
observeddep
instead of tapping into the pipeline.cc: @substack @feross @jmm