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

Documentation on how to keep zip folder structure #28

Open
thiagomajesk opened this issue Nov 27, 2019 · 0 comments
Open

Documentation on how to keep zip folder structure #28

thiagomajesk opened this issue Nov 27, 2019 · 0 comments
Assignees
Labels

Comments

@thiagomajesk
Copy link

Hi! I noticed that when unzipping files it only extracts the content from the zip directly to the destination. Is there a way to keep the zip name as part of the path?

This is part of my task:

download(links)
    .pipe(unzip(unzipOptions))
    .pipe(svgo())
    .pipe(gulp.dest('static'))

For this scenario, given two files with the folder structure bellow:

foo.svg.zip
|--icons
   |-- foo-01.svg
   |-- foo-02.svg

bar.svg.zip
|--icons
   |-- bar-01.svg
   |-- bar-02.svg

The result should be:

|-- static
    |-- foo
    |   |-- icons
    |       |-- foo-01.svg
    |       |-- foo-02.svg
    |-- bar
        |-- icons
            |-- bar-01.svg
            |-- bar-02.svg

Instead of:

|-- static
    |-- icons
        |-- foo-01.svg
        |-- foo-02.svg
        |-- bar-01.svg
        |-- bar-02.svg
@UlisesGascon UlisesGascon self-assigned this Nov 28, 2019
@thiagomajesk thiagomajesk changed the title Documentation o how to keep zip folder structure Documentation on how to keep zip folder structure Jan 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants