On 12/30/15, 10:31 PM, "Andy Dufilie" <andy.dufi...@gmail.com> wrote:

>On Wed, Dec 30, 2015 at 1:05 PM, Alex Harui <aha...@adobe.com> wrote:
>
>> Try: -js-compiler-option="--compilation_level WHITESPACE_ONLY"
>
>
>That worked after fixing the special characters. Is there a place that
>options like this are documented?

Hmm.  I guess not.  Using --help doesn’t work and FalconJX-specific
options don't show up in the Falcon help.  I suppose we should make that
work at some point.

>
>Now that I'm compiling via flexjs/js/bin/mxmlc using the WHITESPACE_ONLY
>option, I get an error in bin/js-release/index.html when it tries to load
>a
>deps.js that doesn't exist.  Based on what I've seen online, the only way
>to avoid this error is to define a var before the base.js code runs, such
>as adding the following script tag in the generated index.html:
>    <script>var CLOSURE_NO_DEPS = true;</script>
>The other option that seems like it should work is to provide an
>additional
>js file to the closure compiler containing this var, but when I try the
>following, it doesn't include my code:
>    -js-compiler-option="--js C:/path/to/myfile.js"
>Shouldn't that work? Is there another way to include JS sources?

Under the hood, FalconJX calls the Java APIs for Google Closure Compiler.
We don't pass it a command line.  So some options like the set of files
are computed and can't currently be dictated via -js-compiler-options.
Patches are welcome to make that work.

>
>A few more questions:
>
>- When I run flexjs/js/bin/compc I get a bin-release folder with the JS
>output files.  I then try to run closure manually on these files, and I
>get
>circular dependency errors for my code that do not appear when using
>flexjs/js/bin/mxmlc. Is there an additional step that happens behind the
>scenes, removing circular dependencies?

Yes.  GoogDepsWriter does that.  Unless you are porting existing libraries
and it is important to retain the APIs, you might want to consider
designing libraries to not have circular dependencies.  I don't want to
make that a hard rule so we try to handle circularities, and there is an
open JIRA to try a more sophisticated scheme of handling circularities.

>
>- Is there a way that I can see exactly what parameters
>flexjs/js/bin/mxmlc
>is passing to the closure compiler?

The JSClosureCompilerWrapper.java file and MXMLFlexJSPublisher.java set up
the call to the Google Closure Compiler.  As I mentioned above, we are
using the Java APIs so there isn't a command-line.

>
>- Is there a documented way to use js.swc instead of playerglobal.swc?

I don't think we have much documentation.  In examples/native you can see
how it is used.  Maybe that will help.

Thanks for all the bugs, patches and questions!  They really are
appreciated.

-Alex

Reply via email to