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

Minify SVG files in Workspace #9

Open
Vitruvius21 opened this issue Aug 9, 2020 · 3 comments
Open

Minify SVG files in Workspace #9

Vitruvius21 opened this issue Aug 9, 2020 · 3 comments

Comments

@Vitruvius21
Copy link

When I click on Minify SVG files in Workspace it does nothing. Pops up notification that all SVG files were minified but the code doesn't change.

Am I doing something wrong or it is a bug?
image

@onetrev
Copy link

onetrev commented Mar 16, 2021

Same issue for me too. But I've also had trouble with this command doing some weird stuff to the two SVGs I was testing with. It seems to happen if I have an SVG open then select Minify SVG files in Workspace. It could also be when I try Workspace minifying twice in a row. The first time does nothing, second time there are glitches and the two SVGs look the same, but are different file sizes. It's really odd. I can't seem to figure out exactly what causes the overwriting. Either way, minifying all files in workspace doesn't work -- AVOID.

Minifying one file at a time works perfectly however.

@GorvGoyl
Copy link

facing the same issue. Can't minify bulk SVGs.

@1000ch
Copy link
Owner

1000ch commented Sep 24, 2021

Unfortunately, the behavior of workspace.textDocuments seems to be weird. workspace.textDocuments requires workspace files to be opened to include them to return value, and need to open each file in a new tab somehow to manipulate, so that it may not suit for this functionality. Also, I found the related issue.

I may need to disable bulk manipulation features at the moment unless there is another approach. Does anyone know it?

1000ch added a commit that referenced this issue Sep 25, 2021
due to the issue related to VSCode API #9
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

4 participants