-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Thanks for making this. I'm using jszip-cli in an npm script, and it's working.
I tell jszip to zip up a dist directory, containing a css subdirectory:
jszip -o target/dist.zip dist
Unfortunately the resulting archive contains the actual dist directory as well, that is dist/css. I just want the css directory.
It appears I'm forced to add a separate configuration file!
{
"entities": [{
"name": "dist",
"root": true
}]
}Then I have to do this:
jszip -o target/dist.zip --config jzip-dist.json
That seems a lot of trouble just to change the root, not to mention that it clutters up my repository and makes my build configuration more complicated. Would it be possible just to add a --root switch or something similar?
Yes, I know that theoretically each entry could be specified "root" independently, and for such cases, sure, you need a configuration file. But for such an overwhelmingly common use case (just zipping up a single directory), it seems like it would be a great benefit to allow a command line option that would simply assume that all indicated entities would have "root" set to true. (The same could be done for --flatten.)