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
71 stars 13 forks source link

Discussion: How should php files be handled? #125

Closed Cube707 closed 3 years ago

Cube707 commented 3 years ago

Should php file be handled differently from other filetypes

In V2.7.1 and priro, php files where treaded differently from the other filetypes. They had only the minify selected text Option. See here: (L271 differs from L261 and L266) https://github.com/Josee9988/MinifyAll/blob/d3e3f5acf287342b617b0f2223a253c6951408d0/package.json#L259-L273

This is the reason I implemented a special case for them and did not include them in the array of supported filetypes in #121. See here: https://github.com/Josee9988/MinifyAll/blob/54425fc5116679a0ca523e0e09c1727e5e3e4e45/package.json#L279-L283

php files are added into the array of standart filetypes with this commit: https://github.com/Josee9988/MinifyAll/commit/d28ad58df6a71c28eb2625b6168fa871dc77f4dd#diff-4fab5baaca5c14d2de62d8d2fceef376ddddcc8e9509d86cfa5643f51b89ce3dR70

This leads to them beein treaded like any other filetype. Is that acapteble? Are there any reasons for the old behavior?

The redundant code could be deleted, if php files are accepted int othe array of standart filetypes.

Josee9988 commented 3 years ago

Yeah, I definitely misunderstood something there, I will keep the old behaviour, which shows in the context menu only minify the selected text.