You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2018/11/20 19:43:57 UTC

[royale-compiler] 01/05: skeleton for externs-report

This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git

commit 9fd4eef0dc62f9f84ddc5874c2ef828d6bf58a76
Author: Alex Harui <ah...@apache.org>
AuthorDate: Fri Nov 16 13:39:58 2018 -0800

    skeleton for externs-report
---
 .../apache/royale/compiler/clients/MXMLJSC.java    |  1 +
 .../driver/js/goog/JSGoogConfiguration.java        | 23 ++++++++++++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSC.java b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSC.java
index 8129274..ecf26f4 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSC.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSC.java
@@ -464,6 +464,7 @@ public class MXMLJSC implements JSCompilerEntryPoint, ProblemQueryProvider,
     			  arg.startsWith("-compiler.js-library-path") ||
     			  arg.startsWith("-compiler.js-define") ||
     			  arg.startsWith("-js-output") ||
+    			  arg.startsWith("-externs-report") ||
     			  arg.startsWith("-js-load-config") ||
     			  arg.startsWith("-warn-public-vars") ||
     			  arg.startsWith("-source-map")))
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/driver/js/goog/JSGoogConfiguration.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/driver/js/goog/JSGoogConfiguration.java
index b6c6d7b..8a08379 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/driver/js/goog/JSGoogConfiguration.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/driver/js/goog/JSGoogConfiguration.java
@@ -446,6 +446,29 @@ public class JSGoogConfiguration extends JSConfiguration
     	warnPublicVars = value;
     }
 
+    // 'externs-report' option
+    //
+
+    private String externsReportFileName = null;
+
+    public File getExternsReport()
+    {
+        return externsReportFileName != null ? new File(externsReportFileName) : null;
+    }
+
+    /**
+     * Prints externs information to the specified output file. This file is an Google Closure Compiler externs file that contains
+     * all of the public and protected APIs in the final SWF file. The file format output
+     * by this command can be used to write a file for input to the {@code -js-compiler-options="--externs <path-to-this-file>"} option.
+     */
+    @Config(advanced = true)
+    @Mapping("externs-report")
+    @Arguments("filename")
+    public void setLinkReport(ConfigurationValue cv, String filename)
+    {
+        this.externsReportFileName = getOutputPath(cv, filename);
+    }
+
     
 
 }