The Google Closure Compiler for JavaScript is quite speedy when I use it online; however, it takes up to 10 seconds to run from the commandline (java -client -jar path/to/closure.jar options...
).
Is there any way to reduce this to the same times as the web app (3 seconds max)? I cannot use the web app because my company requires all builds be able to work without an internet connection.
I suspect this is mostly startup ti开发者_JS百科me (why I added the -client
tag), but I don't know.
I would suggest looking into Plovr[1]. You need only start it once, after which point it will monitor changes in your dependencies and recompile as needed. You can use the same config on your build server to create the output without starting it as a service.
- http://www.plovr.com/
精彩评论