Open kokujin opened 8 years ago
I also can't manage to activate defaultChoice. I'm using it like this:
conflict(my_path, { defaultChoice:'y' })
But it still asks me for manual input...
Ok I understood, with defaultChoice:'y', the system asks for pressing "enter" to confirm replacement, instead of asking what to do. But it would be usefull to have an other option applyDefaultChoice:'true' to launch the whole process without manual intervention.
I'd like to see a bit more documentation here as well. I'm not 100% sure gulp-conflict does what I think it is intending to do via the README, I could be mistaken. For example:
gulp.src(['./files/*.js'])
.pipe(conflict('./dir'))
.pipe(gulp.dest('./dir'));
If I am checking gulp.src(['./files/*.js'])
against ./dir
via .pipe(conflict('./dir'))
, then why do I need to .pipe(gulp.dest('./dir'));
at the end? It seems like the output is supposed to be conflict/no conflict. Is there conceptually something else going on here?
ping! just checking if the repo is still alive.
Yes, you're right that there is missing documentation. There are two more options replaceAll
and skipAll
both of which shouldn't require input from the user.
why do I need to
.pipe(gulp.dest('./dir'));
at the end?
Because this plugin does not touch the disk, it just filters the stream according to if existing files should be overwritten or not. Without it no write to disk would happen.
So it can diff src
files against whatever you do to the stream, but not against another directory of files, correct? Just to clarify, I think then my use case is not possible.
Thanks!
I've just tried "replaceAll", but instead of replacing only the conflicting files, it re-writes every files. Is it the expected behavior ? My need is simply to allow the script to answer "replace" for conflicting files, I do not want it to override every files.
What happen with the documentation? :-1:
Might need to check the source in lieu of documentation at the moment.
I was looking for a way to avoid verbose logging, based on this line it looks like we can define our own logging function to replace the default one. That'd be handy to have in the docs somewhere :)
I tried this
It failed. Can someone show some examples or point me to the docs that can show me how to deal with these issues? Thanks