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

Add options to prevent minified files got minified again #10

Closed
RadhiFadlillah opened this issue Dec 14, 2019 · 2 comments
Closed

Add options to prevent minified files got minified again #10

RadhiFadlillah opened this issue Dec 14, 2019 · 2 comments
Assignees

Comments

@RadhiFadlillah
Copy link

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

Sometimes when opening a *.min.js file, I might accidentally save the file. This is troubling because I'm using this extension with minifyOnSave set to true, which make the minified file get minified again. Sure, there is fault in my part (I should stop reflexively press Ctrl+S after every seconds), however it might be better to add options to exclude some file from minifying process.

Describe the solution you'd like

Minified file shouldn't be minified again.

Additional context

If possible, could you also add settings to exclude some file or directories ? This feature will be useful to prevent VS Code settings and task configuration get minified by this extension.

@Josee9988 Josee9988 self-assigned this Dec 14, 2019
@Josee9988
Copy link
Owner

This could be used only in the commands that create a new minified file.
I think this issue/enhancement is not a really big deal, and I don't really think this could help so much.
I understand what your problem is, but the solution might be more time spending for the user than just taking in mind to not save.

What I am trying to say is:

The extension might enable some absolute paths to not be used.
Or even and probably a good solution, some text to find in the filename to avoid it: suck as: '.min' and when you press save, it will match '.min' in the filename and will simply output a message.

I do not know if it is worth the time adding these measures or simply doing CTRL+Z in your code.

My main point is: It could be done but I do not see how this could benefit the extension at all. Doesn't seem to me like something to enhance.

Let me know what you think so we can try to find a better solution.

Thanks for your time @RadhiFadlillah !!

@RadhiFadlillah
Copy link
Author

I do not know if it is worth the time adding these measures or simply doing CTRL+Z in your code.

Yeah, I'm agree. I just realized the minified output is not automatically saved to file, which make it still undo-able.

With that said, I will close this issue. Thanks for the fast response 😄

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

2 participants