Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<pre><code>java -jar compiler.jar ^ --module jq:1: --js jquery-1.6.2.js ^ --module t:1:jq: --js test.js ^ --compilation_level ADVANCED_OPTIMIZATIONS </code></pre> <p>This example will compile out 2 files for you:</p> <ul> <li>jq.js</li> <li>t.js</li> </ul> <p>jq.js will be jquery 1.6.2 with advanced minification, and t.js will use that minified version of JQuery properly.</p> <p>I wish there was a JavaFiddle I could post this to to demonstrate it.</p> <p><br/></p> <p><strong>Older version</strong></p> <p>This original answer was for an older version of Closure Compiler. I've left it intact below in case you're in an environment that needs to keep the older version in place.</p> <p>How to handle multiple output files, aka modules: <a href="http://groups.google.com/group/closure-compiler-discuss/browse_thread/thread/ec7f6809b19b019e/25a94f3994173840">http://groups.google.com/group/closure-compiler-discuss/browse_thread/thread/ec7f6809b19b019e/25a94f3994173840</a></p> <p>Copy/pasting:</p> <pre><code>java -jar Build\Tools\compiler.jar ^ --compilation_level=ADVANCED_OPTIMIZATIONS ^ --externs Build\jQuery.externs.js ^ --js Build\Output\Compiling.js ^ --js Script/Themes.lang.js ^ --js Script/Themes.js ^ --module Core:3 ^ --js UI/ThemeChooser/ThemeChooser_en.htm.js ^ --js UI/ThemeChooser/ThemeChooser.js ^ --module UI_ThemeChooser:2:Core ^ --js UI/VerticalTabs/VerticalTabs_en.htm.js ^ --js UI/VerticalTabs/VerticalTabs.js ^ --module UI_VerticalTabs:2:Core ^ --js Pager/Pager_en.htm.js ^ --js Pager/jquery.Pager.js ^ --js Pager/Pager.js ^ --module Pager:3:VerticalTabs ^ --module_output_path_prefix .\Compiled\ </code></pre> <p>And as he notes, --js_output_file is irrelevant when outputting modules.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload