flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: [FalconJX] compiling non-browser javascript
Date Mon, 25 Apr 2016 15:27:23 GMT

On 4/25/16, 8:16 AM, "Josh Tynjala" <joshtynjala@gmail.com> wrote:

>In the bin/js-release directory, all of the generated JavaScript is
>concatenated into a single file, so it no longer uses goog.require(). That
>should work in environments that cannot load multiple scripts.

I was about to suggest that as well.  By default, the single-file output
is minified so is hard to debug.  You can add
  -js-compiler-option="--compilation_level WHITESPACE_ONLY"

to the cross-compile and I think you'll still get a single file without
goog.require but it will be debuggable.

These options are handled by the compiler code in a Publisher.
MXMLFlexJSPublisher has this default behavior.  You can subclass it and
create a different js-output-type get it to spit a single-file to the
js-debug and a minified single-file to js-release.  It will take a long
time, though, as gathering in a single file is done by the Google Closure
Compiler.  But you don't to know much about compilers to make a custom
Publisher.  Everything is compiled at that point and you are basically
dealing with files and configs for GCC.

A harder task is to make the goog.require replaceable with some other


View raw message