Closed rootty closed 9 years ago
Even if i put .gitignore file into folder2/, and folder2/folder3, if folder3 is also empty, it skips them.
gulp.src
matches files. If you want a folder put a dotfile
in it. You'll also need to pass in the option to gulp.src
to enable matching dotfiles.
@sindresorhus interesting, if I just copying from src to dest, it also copying empty folders to new destination.
gulp.task('ziptest', function () {
return gulp.src('zip_test/**/*')
.pipe(debug({title: 'unicorn:'}))
//.pipe(ziptest('archive.zip'))
.pipe(gulp.dest('zip_test2'));
});
Thank you for an advice with .dot-files.
Actually, yeah, I guess I could use https://stuk.github.io/jszip/documentation/api_jszip/folder_data.html for folders.
On file(...)
, dir : file.isDirectory()
will work too :) (see https://stuk.github.io/jszip/documentation/api_jszip/file_data.html)
Done in https://github.com/sindresorhus/gulp-zip/commit/1239836bbae8f0961776406e5f55072ebb51d1c8
Still needs a test. I don't have time to do that right now. So if you want it published, PR welcome for a test ;)
Hello,
I have following folder structure:
As a result I have archive.zip with all folders except /folder2
Test environment: 1) Windows 8.1 2) "gulp": "^3.8.10" 3) "gulp-zip": "^2.0.3" 4) node -v v0.12.0