Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add createSubFolders option, default to true
The zip files generated by gulp-zip do not actually contain "real" folders (that is, folders with the `D` attribute and `store` method). Opening a zip with a GUI decompression utility shows folders, but they're really "virtual" folders that are just defined by the path of the files in the zip. Extracting the zips creates the actual folder structure, but a decompression utility looking specifically for folders won't find anything, as the `D` attribute is not present. There's a pull request pending for JSZip to add an option to automatically create "real" sub-folders when using the `.file` method (Stuk/jszip#157). This commit is in anticipation of the pull request being accepted, so that gulp-zip can take advantage of the new functionality in JSZip. Including this option in calls to JSZip before the option exists won't cause any errors, so it's safe to preemptively add this to gulp-zip. Currently, the `createSubFolders` option defaults to `true`, but can be set to false by passing `createSubFolders: false` as an option to gulp-zip.
- Loading branch information