On Nov 14, 8:51 am, John Lenz <
concavel...@gmail.com> wrote:
> Until we have the documentation ready, here is a simple overview. The
> compiler supports compiling multiple javascript source files together (so
> they are renamed and optimized as a unit) but the output divided into
> "modules" that can be loaded separately. The idea is that core
> functionality can be part of the initial module that is initially loaded and
> less used features can be loaded later.
>
> Here is an example:
>
> java -jar compiler.jar --js src1.js --js src2.js --js src3.js --module
> first:2 --module second:1:first
>
> This will create to modules:
> first.js
> second.js
>
> The first module, I've named "first", contains the 2 file (the first two
> --js parameters listed). The second module, I've named "second", contains
> one file, the next --js entry following those included in the first module,
> the second module depends on the first.
>
> "--module_output_path_prefix" is straightforward.
>
> "--module_wrapper" is simply a way to add some extra text before and or
> after the compiler output. For example, if you wanted to add a comment to
> the top of the file:
>
> --module_wrapper "/* copyright 2010 */ %s"
>
> Have fun.
>
> -John
>