Giter Site home page Giter Site logo

Comments (7)

isochronous avatar isochronous commented on May 25, 2024

Well, after looking at the jsZip documentation, it seems like the .file call should be sufficient, as the .folder method returns a new jsZip instance for chaining, which doesn't really solve the problem as far as I know. I'm going to open an issue with the jsZip library itself.

from gulp-zip.

dduponchel avatar dduponchel commented on May 25, 2024

The .folder method creates a new entry in the zip file (flagged as a directory) and returns a new instance for chaining. Calling .folder instead of .file will be enough in this case.

from gulp-zip.

isochronous avatar isochronous commented on May 25, 2024

I don't know whether the fix is as simple as simply switching between .folder and .file based on the results of .isDirectory, but if you think it is, I'll give it a shot. If it's more complex than that, I'll be happy to try out any proposed fix you might come up with.

from gulp-zip.

isochronous avatar isochronous commented on May 25, 2024

Turns out JSZip had only just been updated with a "fix" that caused this problem. I'm working with the JSZip author to provide a fix.

from gulp-zip.

isochronous avatar isochronous commented on May 25, 2024

Could you please publish this new version to npm? This is kind of a sticking point for an active project I'm working on.

from gulp-zip.

sindresorhus avatar sindresorhus commented on May 25, 2024

@isochronous Yes, when #31 is resolved. Review of that PR welcome.

If you can't wait you can easily depend on a git SHA. See npm docs.

from gulp-zip.

isochronous avatar isochronous commented on May 25, 2024

I had no idea you could do that with npm. That's awesome, thank you!

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.