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

Clean up empty folders #15

Closed
gVguy opened this issue May 26, 2022 · 2 comments
Closed

Clean up empty folders #15

gVguy opened this issue May 26, 2022 · 2 comments

Comments

@gVguy
Copy link

gVguy commented May 26, 2022

Is there a way to clean up empty folders after the plugin ran?

@amandaghassaei
Copy link

Not sure about limiting deletion to only empty folders, but the syntax for deleting folders is:

del({ targets: "./dist/*/" }),

This deletes all subfolders in dist, regardless of if they are empty or not. see https://github.com/sindresorhus/del for more info.

@vladshcherbin
Copy link
Owner

Empty folders can be seen if the pattern used just removes files, for example 'dist/*.js'. I believe it's possible to delete whole folder by just using its name, for example dist.

@amandaghassaei thank you for answering, should be resolved 🙌

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