I’m calling Closure Compiler (closurecompiler.jar) from inside a script. The script is also generating some javascript that Closure Compiler needs to compile. Is there any way to parse this javascript into Closure Compiler without writing it to disk and reading it with --js.
I’m calling Closure Compiler (closurecompiler.jar) from inside a script. The script is also generating
Share
If you don’t specify a –js parameter, the compiler reads from the standard input. This is going to totally depend on what operating system and scripting language you’re using, but you should be able to open a pipe to a sub-process and write to it. If you’re using PHP on Linux/Mac/Unix for example:
You should be able to adapt this to just about any language.