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

Ignore files based on RegEx list #131

Open
LeeCoder139 opened this issue Oct 11, 2021 · 8 comments
Open

Ignore files based on RegEx list #131

LeeCoder139 opened this issue Oct 11, 2021 · 8 comments
Assignees
Labels
Type: Feature Suggest a new feature.

Comments

@LeeCoder139
Copy link

🚀 Feature Request

Is your feature request related to a problem? Please describe.

  • !!!! My VSCode workspace file is being minified! I don't really want this file (and other extension option files like: .gitignore & .prettierrc) to be minified. I don't publish these files. I tried the "MinifyAll.disableJson" setting but it didn't seem to work. !!!!

Describe the solution you'd like

  • !!!! A settings option which works exactly like StandardJS's "standard.options > ignore" setting I think would cover it. !!!!

Describe alternatives you've considered

  • !!!! Another idea is to fix "MinifyAll.disableJson" setting so it doesn't minify JSON files even though it doesn't have the JSON extension !!!!

Additional context

  • thanks for all your work on this extension. Kind regards Lee

  • P.S. I haven't really explored the disableJson setting not working for Json files without JSON extension problem it may not be the reason. Also I haven't checked if MinifyAll minifies ".gitignore & .prettierrc" I only added them just to emphasise the need need for a pattern matching ignore setting.

@LeeCoder139 LeeCoder139 added the Type: Feature Suggest a new feature. label Oct 11, 2021
@welcome
Copy link

welcome bot commented Oct 11, 2021

Thanks for opening your first issue in Josee9988/project-template! Be sure to follow the issue template and provide every bit of information to help the developers!

@Josee9988
Copy link
Owner

The minifier only does minify files with the enabled extensions so it will never minify a .gitignore.
But it might be a good idea to disable the minimisation via a file following a specific pattern.

@LeeCoder139
Copy link
Author

LeeCoder139 commented Oct 12, 2021 via email

@Cube707
Copy link
Contributor

Cube707 commented Oct 12, 2021

A .workspace file is of the file type "JSON with comments", represented by jsonc in the settings. Disabling that will turn off the minifier on that file type while still minifying normal JSON files. That is probably sufficient as a quick workaround.

@Josee9988 I would recommend making the option description more clear.

From my point of view this should be sufficient and the use cases where there are actually collisions between files that are minified regularly and files that should not be minified are very rare. Most of the time the files are edited so rarely that disabling minify temporarily is absolutely fine.

If @LeeCoder139 is fine with the correct option and can continue working, I would note this problem and wait if more issues about collisions come up and if that is the case a pattern ignore option can be implemented. Maybe create a todo or milestone?

@LeeCoder139
Copy link
Author

LeeCoder139 commented Oct 12, 2021 via email

@Josee9988 Josee9988 changed the title Please add new option to ignore files based on RegEx list (apologies if this feature is already a request) Ignore files based on RegEx list Oct 21, 2021
@LeeCoder139
Copy link
Author

LeeCoder139 commented Oct 22, 2021 via email

@Josee9988
Copy link
Owner

Perfect, I will still maintain this issue open and fix it

@Cube707
Copy link
Contributor

Cube707 commented Apr 6, 2022

One thout I just had on this matter and wanted to document:

Implementing the regex ignroe would also allow useres to ignore specific filetypes ("ignore": "**/*.css" for example). Therefor the question: Should this feature make the existing Disable specific lanuage options depricated?
It would probably be more performant and keep the config interface more consistent an clutter free.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Suggest a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants