I'm doing a web based java application using Netbeans IDE, There are some javascript files in netbeans IDE. I need to Obfuscate or minify my javascript files automatically when I clean and build the project, Is there any solution for that? or do I need to write any build script , please provide me a solution
Asked
Active
Viewed 1,965 times
1
-
1*"Obfuscate or minify"* - Which? – nnnnnn Sep 25 '16 at 08:36
-
use an obfuscater to obfuscate, use a minifier to minify - hth – Jaromanda X Sep 25 '16 at 09:10
2 Answers
1
You can use gulp. Gulp has a great gulp-uglify plugin for that(https://www.npmjs.com/package/gulp-uglify).

Mykhailo Mykhaliuk
- 230
- 2
- 7
1
If it's a simple website and you don't want to use advanced solutions like task runner (Gulp) you can simply use website like this one - https://jscompress.com/ - and minify your all files after your page is done.

Marcin Zalewski
- 80
- 10
-
"_I need to Obfuscate or minify my javascript files automatically ..._" Looks like OP wants to use some advanced solutions? – Teemu Sep 25 '16 at 08:42