-1

I just write a small js plugin and i don't know minify it like other MIT License plugin ex: jquery, owlcarousel . So i have questions.

  1. What is library to do that (build *.min.js file like jquery, owlcarousel)
  2. What heppend after build? Seem *.min.js file was minify and obfuscation?
  3. *.min.js file will not deobfuscate ?
DeLe
  • 2,442
  • 19
  • 88
  • 133

1 Answers1

2

What is library to do that (build *.min.js file like jquery, owlcarousel)

I recommend using UglifyJS. You can do many process with this module and minification is one of them. Here are other online tools that might as well help you. Javascript-Minifier and Minifier.org.

What heppend after build? Seem *.min.js file was minify and obfuscation?

Minification and Obfuscation are different process with different intention. Minification just removes unneeded spaces and changes some variables to make it shorter and a little bit harder to understand. Whereas, obfuscation intends to make the script unreadable by human. Therefore, if you want to know if the build process of a library make your code minified and obfuscated, it really depends on the library you use. Most of them will do only one thing either minification or obfuscation.

*.min.js file will not deobfuscate ?

Yes. Minification will not deobfuscate your code.

And here is an online Javascript obfuscator in case you need one.

holydragon
  • 6,158
  • 6
  • 39
  • 62
  • Seem `jquery` and `owlcarousel` using `grunt` to minimize and compress? and i think them were obfuscation? b/c when i decode `owlcarousel.min.js` by https://beautifier.io/ i can't understand `! function(a, b, c, d) {...`? And my last question is `file will cannot decode?` that i mean – DeLe Dec 20 '18 at 02:26
  • 1
    That is minification. The beautifier cannot make the variables become the original readable text once it is uglified or obfuscated. For the last question, the minified script will not be able to fully unminified. Most you can do is what you see in the beautifier.io. – holydragon Dec 20 '18 at 02:52