-
-
Notifications
You must be signed in to change notification settings - Fork 157
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
Refactor with vinyl-prepare #230
Conversation
Thanks for untangling this @phated! I'll try to keep things more cleanly separated in future. About #139, on the src side, I believe every option except I was wondering if it makes sense to also rename our |
@erikkemperman no problem. I would typically just squash your stuff with the github UI but I wanted to document the extra features. I need to review all the options stuff (I want to try to centralize it in some manner) before I close that issue. I think you landed a rename (to |
I looked at centralizing them when I was looking at this, figuring prepare would be the place for it. But I got stuck, mostly because you preferred glob (well, file operations) stay at vinyl-fs. Perhaps a separate module used by vinyl-fs and vinyl-prepare? Yeah, I renamed the option to readFile internally because we now need it later than we did before (per file instead of once up front) and as such it would have clashed with through2. |
b3666b3
to
f39023f
Compare
@erikkemperman I've added the sourcemap(write) stuff into my first commit (since I'm no longer putting it in vinyl-prepare). Can you take a look and give me feedback? I'm going to be applying similar logic into your commit for src |
Sure, I'll take a look. One potential downside, I guess, to not having this in prepare is that the sourcemaps will be excluded in the "dry run" scenario that got all this started... |
@erikkemperman that is one of my goals. @doowb didn't need sourcemaps in his request but I was trying to over-engineer (as I do). |
@phated Fair enough, it's just that I would have expected a dry run to include them (especially when they're to be written separately). Reading through the original issue, it also mentioned moving the And actually, didn't you consider making mkdirp a stream, at one point? |
The |
Right. It'd be slightly messy in write-contents, that's true. I don't know enough about the original use case to judge, but my understanding is they wanted to be able to reconstruct the directory structure as it would be created by So far this looks good, but I'd need more time than I have right now to try this in an actual project. |
@erikkemperman that's actually the opposite of what they wanted. haha. Thanks for taking a look; I'm working on the |
Our main goal is to be able to use I'll take a closer look at this when I get a chance and provide some feedback (if necessary). It might be a couple of days so don't wait on me when you're ready to merge :). |
@erikkemperman I'm sticking a bunch of stuff in this PR that is related to the prepare stream changes but I'm not sure how I'm going rebase/merge them into master. |
@phated The opposite? Maybe I should have said "predict" rather than "reconstruct" but I wasn't that far off, Shirley :-) |
I think the gulp-sourcemaps dependency can now go away, right? I'll link this into an actual project or two tonight (GMT+2) and let you know how that goes! |
@erikkemperman I think there are a bunch of deps I need to remove with these changes. I'll double check. |
6e90324
to
3b2df28
Compare
As soon as these tests finish running, I'm going to call this PR done. There are still things to do but I don't want to keep lumping them in here. |
This is the WIP branch using vinyl-prepare. I might also try to land #139 (including sourcemap support) in this changeset (separate commits).