#10282 closed enhancement (fixed)
Support for Google Closure Compiler in build scripts
Reported by: | Adam Peller | Owned by: | James Burke |
---|---|---|---|
Priority: | high | Milestone: | 1.4 |
Component: | BuildTools | Version: | 1.4.0b |
Keywords: | Cc: | Nathan Toone | |
Blocked By: | Blocking: |
Description
as an alternative to shrinksafe, packer, etc.
Attachments (2)
Change History (5)
Changed 11 years ago by
Attachment: | 10282.patch added |
---|
comment:1 Changed 11 years ago by
I'm trying to get closure to work, but just for the "simple optimizations" minification. I'm running into what I believe are type conversion issues with JavaScript? talking to Java. I attached a patch showing where I am at. To try it:
- Download the closure compiler (I used compiler-20091106b.zip): http://code.google.com/p/closure-compiler/downloads/list
- Place it in dojo/util/closurecompiler/compiler.jar
- Apply the above patch from the dojo/util/buildscripts directory.
- Run the following build command:
java -classpath ../shrinksafe/js.jar:../closurecompiler/compiler.jar org.mozilla.javascript.tools.shell.Main build.js profile=base releaseName=clos layerOptimize=closure action=release
I complains about:
js: Cannot convert [email protected] to com.google.javascript.jscomp.JSSourceFile
Even though I am calling JSSourceFile.fromCode() to generate the source file. Not sure how to resolve the issue. Any ideas are appreciated.
Changed 11 years ago by
Attachment: | 10282.liucougar.patch added |
---|
fixing the type error and add keepLines support
comment:2 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 Changed 11 years ago by
Milestone: | tbd → 1.4 |
---|
Docs added here: http://docs.dojocampus.org/build/index#using-google-s-closure-compiler
and the 1.4 release notes were updated.
Beginning of a patch, but has a type error.