node-modules / compressing

Everything you need for compressing and uncompressing
MIT License
436 stars 34 forks source link

How can i use zip.compressDir without origin directory ? #64

Open joenix opened 2 years ago

joenix commented 2 years ago

How can i use zip.compressDir without origin directory ?

mikesiiro commented 1 year ago

Having the same issue. So just for clarification, we have a dist folder with some files:

We want to compress the dist folder into dist.tgz and keep the folder structure without nesting the div folder inside dist.tgz/dist/...

Is there a way to do this ?

YiAnzzz commented 1 year ago

Maybe you can set the opt { ignoreBase: true } to solve the problem.

eg: compressing.zip.compressDir(srcUrl,dsetUrl,{ ignoreBase: true })