Closed thany closed 4 years ago
I do not want to release my Lossless JPEG decoder as open-source, I can offer it only as obfuscated code (as a "black box").
I believe the minified parts will never need to be changed, and we can use them as black boxes. Since UTIF.js is just one long file, having these minified parts helps navigating in it.
I do not want to release my Lossless JPEG decoder as open-source, I can offer it only as obfuscated code (as a "black box").
Then it should not be in source code like that. Please reference it by importing a file that is minified, and marked as such. So a minifier can take that into account, and can choose not to minify minified code.
I believe the minified parts will never need to be changed
You know that is not true.
Since UTIF.js is just one long file
There's no compelling reason, as far as I can tell, for it to be that way. One long file is almost always harder to navigate than a couple of smaller files, where a main/index imports them.
I really like when a library is just one JS file. It does not require multiple Githubissues.
There are two big blobs of minified code in UTIF.js. Please unminify them.
If folks need minification in their projects, they will already have that set up. A library doesn't need to come minified, and especially shouldn't have minified code in its source code.
Minified code in sourcecode always looks and feels like trying to hide something. It's a common pattern for malicious code. Another disadvantage is that it's not humanly possible to fix bugs or make other changes. And even you are a wizard that can work in minified code, others can't. And a diff in an incoming PR will look absolutely terrible.