3

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

now it's only minifying a single jar, I would like to combine them

enter image description here

Kiwi
  • 2,713
  • 7
  • 44
  • 82
  • try this : http://stackoverflow.com/questions/1691969/how-to-use-googles-closure-to-compile-javascript – Radi Jul 30 '15 at 07:33

1 Answers1

4

One simple way to do it:

  1. Create a closure.command file (or whatever you want to name it) in the same directory as your js files. Put Closure command line options in it like so:

--js file1.js

--js file2.js

--js_output_file all.min.js

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

** Since you want it to operate on js files from different directories you may have to modify the file paths and "Working Directory" option for it to work properly.

Community
  • 1
  • 1
Aaron Rox
  • 89
  • 1
  • 7