windows compatibility #1
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was trying to make use of gulp-newy, and it seems to have trouble on Windows. First, my reduced test gulpfile:
All input parameters to the callback function are in the form similar to C:\TEMP\foo\bar, which your test for missing dir can't handle properly. Every missing output file will print warning about "missing directory: \C:", even if the directories are there. I found out about it when I wrote task to pipe about 60 files though imagemin - resulting output looks like it's end of the world, full of red.
I rewrote your test for missing dir from the other end. path.dirname just removes last component of the path, it doesn't care if it is dir or file - so I let it just works backwards from full path until if finds a dir that does exist. This seems to work on both systems.
Second commit just limits the warning to one per each missing directory, I think it makes more sense, but feel free to ignore it.