Giter Site home page Giter Site logo

Skips empty folders about gulp-zip HOT 6 CLOSED

sindresorhus avatar sindresorhus commented on May 25, 2024
Skips empty folders

from gulp-zip.

Comments (6)

rootty avatar rootty commented on May 25, 2024

Even if i put .gitignore file into folder2/, and folder2/folder3, if folder3 is also empty, it skips them.

from gulp-zip.

sindresorhus avatar sindresorhus commented on May 25, 2024

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.

from gulp-zip.

rootty avatar rootty commented on May 25, 2024

@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.

from gulp-zip.

sindresorhus avatar sindresorhus commented on May 25, 2024

Actually, yeah, I guess I could use https://stuk.github.io/jszip/documentation/api_jszip/folder_data.html for folders.

from gulp-zip.

dduponchel avatar dduponchel commented on May 25, 2024

On file(...), dir : file.isDirectory() will work too :) (see https://stuk.github.io/jszip/documentation/api_jszip/file_data.html)

from gulp-zip.

sindresorhus avatar sindresorhus commented on May 25, 2024

Done in 1239836

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 ;)

from gulp-zip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.