Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
joenix opened this issue Dec 1, 2021 · 2 comments
Open

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

joenix opened this issue Dec 1, 2021 · 2 comments

Comments

@joenix
Copy link

joenix commented Dec 1, 2021

How can i use zip.compressDir without origin directory ?

@mikesiiro
Copy link

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 ?

@YiAnzzz
Copy link

YiAnzzz commented Nov 29, 2022

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants