Compiling the Closure compiler

I have the following setup in my phpstorm and I would like to combine the javascript files located in the folder /js/app

and /js/lib

.

now it only minimizes one jar, I would like to combine them

enter image description here

+3


source to share


1 answer


One easy way to do it:

  • Create a clos.command file (or whatever you want to call it) in the same directory as your js files. Enter Closure parameters on the command line as follows:

- js file1.js

- js file2.js

- js_output_file all.min.js



  1. Edit the Closure file watcher arguments to include "--flagfile close.command". You probably want to uncheck the "Create output file from stdout" checkbox.

** Since you want it to work with js files from different directories, you may need to change the file paths and "Working Directory" for it to work correctly.

+4


source







All Articles