Skip to content
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

overwrite option in .dest() #30

Closed
sindresorhus opened this issue Jun 30, 2014 · 15 comments
Closed

overwrite option in .dest() #30

sindresorhus opened this issue Jun 30, 2014 · 15 comments

Comments

@sindresorhus
Copy link

It would be useful if .dest() had an option to not overwrite existing files.

Use-case: You build a lot of stuff into a dist folder and you want a task to copy all the files that weren't already processed by the pipeline. Yes you could do some trickery with streams, but this would be much easier.

@yocontra
Copy link
Member

Could be achieved easily by changing the write mode from w to wx if the option was given.

Does gulp.dest('folder', {overwrite: false}) seem like a fine API?

@sindresorhus
Copy link
Author

I think wx will make it throw, at least catch that then, or just fs.exists beforehand.

Does gulp.dest('folder', {overwrite: false}) seem like a fine API?

Yes.

@yocontra
Copy link
Member

@sindresorhus fs.exists seems like an unnecessary extra system call, I'll catch the wx errors

@jlukic
Copy link

jlukic commented Oct 20, 2014

Was this implemented?

@kevva
Copy link

kevva commented Oct 20, 2014

The issue is still open, so no.

@JaKXz
Copy link

JaKXz commented Jan 13, 2015

It'd be awesome to see this.

@gad2103
Copy link

gad2103 commented Jan 29, 2015

+1

1 similar comment
@gittycat
Copy link

+1

@yocontra
Copy link
Member

Instead of +1 maybe you should think about sending a pull request...

@qfox
Copy link

qfox commented Feb 16, 2015

@contra 👍

@yocontra
Copy link
Member

closed by #59 - use master or it will be out in the 4.0 release

@phillip-haydon
Copy link

Was this removed? It doesn't work...

@nillis
Copy link

nillis commented Feb 19, 2016

@phillip-haydon +1

@qfox
Copy link

qfox commented Feb 19, 2016

Was this removed? It doesn't work...

@nillis, @phillip-haydon This is implemented to master. Guess it won't be backported to 3.x.
#59

@phated
Copy link
Member

phated commented Feb 19, 2016

All vinyl-fs code is essentially "backported" to 3.x - There are breaking changes so we can't include it as a dependency to gulp but you can change your gulp.src and gulp.dest calls to vinylfs.src and vinylfs.dest calls and stuff will continue to work, but take a look at the breaking changes before you swap everything out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests