Josee9988 / MinifyAll

A 𝗩𝗦𝗖𝗼𝗱𝗲 𝗺𝗢𝗻𝗢𝗳𝗢𝗲𝗿 for JS, JSON/C, CSS, and HTML, you will love its simplicity! 🌟 π˜Ύπ™€π™’π™₯π™§π™šπ™¨π™¨ and π™œπ™―π™žπ™₯ files and folders πŸ“¦ Reduce your bundle and file sizes with lightning speed ⚑
https://minifyall.jgracia.es/
GNU General Public License v3.0
73 stars 13 forks source link

When saving to new file, don't open the minified version in editor #9

Closed RadhiFadlillah closed 4 years ago

RadhiFadlillah commented 4 years ago

Describe the bug

First of all, thanks for this extension, it's the simplest minifier that I've used with minimal configuration. Unfortunately, I have problem when I'm using minifyOnSaveToNewFIle = true.

When I'm working on a code, I often run save on it. This is a habit that I picked up long ago from using a code editor that often crashed without warning. So, my flow is :

Now, when using minifyOnSaveToNewFIle, it will open the minified file in new editor, hence break my flow and focus. With that said, is it possible to prevent extension opening the minified file automatically ?

To Reproduce

Set your setting like this :

{
    "MinifyAll.minifyOnSaveToNewFIle": true,
    "MinifyAll.PrefixOfNewMinifiedFiles": ".min",
}

Write a Javascript code, then save it.

Expected behavior

When using minifyOnSaveToNewFIle,The minified file should be generated in background and not shown to user.

Screenshots

I've made a screencast in Gfycat

Additional context

It seems there are typos in setting's name and description :

Josee9988 commented 4 years ago

Hi, @RadhiFadlillah
I understand your problem and I could imagine how could this stop your workflow and even be annoying, so I'll try to fix it ASAP by adding a setting that will prevent from opening the new minified file.

About the typos: I'm aware of the problem but I can not just change it because all the users that have these settings will found that these settings will stop working. So probably I'll create the right setting and keep the old ones to maintain retro compatibility.

Anyways thanks for your issue, stay tuned to see the new changes!

Josee9988 commented 4 years ago

Done, download the new version 1.9.0. Use the setting below, it will also prevent from showing a message telling you the file is minified in /path/foo/bar...

    "MinifyAll.openMinifiedDocument": false

Thanks for helping the extension, If you have more things to ask for improvement feel free to create as many issues as you want or contact me.

I appreciate your help @RadhiFadlillah !

RadhiFadlillah commented 4 years ago

Oh my, that was fast. Thanks !

Josee9988 commented 4 years ago

Ps: I've just fixed the typos you mentioned to me, thanks again!