1

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

kAsdh
  • 356
  • 1
  • 10
  • 25

2 Answers2

1

You can use gulp. Gulp has a great gulp-uglify plugin for that(https://www.npmjs.com/package/gulp-uglify).

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.

  • "_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