compressing icon indicating copy to clipboard operation
compressing copied to clipboard

How can i use zip.compressDir without origin directory ?

Open joenix opened this issue 4 years ago • 2 comments

How can i use zip.compressDir without origin directory ?

joenix avatar Dec 01 '21 07:12 joenix

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

  • index.html
  • style.css
  • main.js
  • package.json

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 ?

mikesiiro avatar Nov 24 '22 11:11 mikesiiro

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

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

YiAnzzz avatar Nov 29 '22 11:11 YiAnzzz