-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Correct gulp install script's wrench config for src/site
merges
#1845
Conversation
Even though the gulp install script outputs: ```Site folder exists, merging files (no overwrite) project-dir/semantic/src/site/``` The `src/site` directory is blown away, not preserving existing files, due to the `forceDelete:true` setting.
src/site
mergessrc/site
merges
My understanding is that See this big old note in WrenchJS readme I'm worried that if we change I will need to retest this. |
You're correct. This PR doesn't correct the problem completely. This fix preserves the files in the There seems to be a wrench-js issue copying into an existing directory while preserving existing files. The As you mentioned, in wrench v1.5.0 there was a breaking change introduced which seems to be impacting the install script. If From: https://github.com/ryanmcgrath/wrench-js/blob/master/lib/wrench.js
I'll submit a PR to wrench-js to honor the What are your thoughts? |
PR created for correcting this behavior within wrench: |
Thanks @derekslife you present this all quite lucidly. I think we can point to your forked wrench copy as an NPM dependency, add your patch, then wait for a response to your PR. The project seems to be relatively idle, so I'm not counting on it being quick. |
Merged into |
I've tested install with changes and everything seems to be fine, files are preserved and new files are copied to existing directories. Pushing with |
Thanks. In the long term, due to wrench's stale project state, we should explore moving away from it all together. It would be more idiomatic to just use gulp's own vinyl-fs. However, we may have to submit a PR for this issue (gulpjs/vinyl-fs#30) to get the overwrite behavior needed. |
Agreed. Would prefer to use something native. Its always nice to replace a 10 liner with a 1 liner though when it makes sense. Lets pray Gulp 4 won't require everything to be rewritten. |
PR Submitted: gulpjs/vinyl-fs#59 |
Even though the gulp install script outputs:
Site folder exists, merging files (no overwrite) project-dir/semantic/src/site/
The
src/site
directory is blown away (not preserving existing files) due to theforceDelete:true
setting.