You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by er...@apache.org on 2013/11/17 14:53:14 UTC

git commit: [flex-falcon] [refs/heads/develop] - Created defaults for the mandatory FlexJS command line arguments. You can now build a FlexJS project by specifying only the '-load-config', '-sdk-js-lib' and '-closure-lib' arguments (and of course the mai

Updated Branches:
  refs/heads/develop 753c7853a -> c8275ed61


Created defaults for the mandatory FlexJS command line arguments. You can now build a FlexJS project by specifying only the '-load-config', '-sdk-js-lib' and '-closure-lib' arguments (and of course the main project file.

Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/c8275ed6
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/c8275ed6
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/c8275ed6

Branch: refs/heads/develop
Commit: c8275ed6186a1010c4823ed9b06f1a4f7c68b0b6
Parents: 753c785
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Sun Nov 17 14:52:53 2013 +0100
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Sun Nov 17 14:52:53 2013 +0100

----------------------------------------------------------------------
 .../flex/compiler/clients/JSConfiguration.java  |  2 +-
 .../apache/flex/compiler/clients/MXMLJSC.java   | 36 ++++++++++-------
 .../driver/js/goog/JSGoogConfiguration.java     | 41 ++++++++++++++++++++
 3 files changed, 63 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c8275ed6/compiler.jx/src/org/apache/flex/compiler/clients/JSConfiguration.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/clients/JSConfiguration.java b/compiler.jx/src/org/apache/flex/compiler/clients/JSConfiguration.java
index 43d50c5..e15101c 100644
--- a/compiler.jx/src/org/apache/flex/compiler/clients/JSConfiguration.java
+++ b/compiler.jx/src/org/apache/flex/compiler/clients/JSConfiguration.java
@@ -46,7 +46,7 @@ public class JSConfiguration extends Configuration
     // 'js-output-type'
     //
 
-    private String jsOutputType;
+    private String jsOutputType = MXMLJSC.JSOutputType.FLEXJS.getText();
 
     public String getJSOutputType()
     {

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c8275ed6/compiler.jx/src/org/apache/flex/compiler/clients/MXMLJSC.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/clients/MXMLJSC.java b/compiler.jx/src/org/apache/flex/compiler/clients/MXMLJSC.java
index 1b3f7d1..ca717c3 100644
--- a/compiler.jx/src/org/apache/flex/compiler/clients/MXMLJSC.java
+++ b/compiler.jx/src/org/apache/flex/compiler/clients/MXMLJSC.java
@@ -145,28 +145,34 @@ public class MXMLJSC
         long startTime = System.nanoTime();
 
         IBackend backend = new ASBackend();
+        String jsOutputTypeString = "";
         for (String s : args)
         {
             if (s.contains("-js-output-type"))
             {
-                jsOutputType = JSOutputType.fromString(s.split("=")[1]);
-
-                switch (jsOutputType)
-                {
-                case AMD:
-                    backend = new AMDBackend();
-                    break;
-                case FLEXJS:
-                    backend = new MXMLFlexJSBackend();
-                    break;
-                case GOOG:
-                    backend = new GoogBackend();
-                    break;
-                }
-
+                jsOutputTypeString = s.split("=")[1];
                 break;
             }
         }
+        
+        if (jsOutputTypeString.equals(""))
+        {
+            jsOutputTypeString = JSOutputType.FLEXJS.getText();
+        }
+
+        jsOutputType = JSOutputType.fromString(jsOutputTypeString);
+        switch (jsOutputType)
+        {
+        case AMD:
+            backend = new AMDBackend();
+            break;
+        case FLEXJS:
+            backend = new MXMLFlexJSBackend();
+            break;
+        case GOOG:
+            backend = new GoogBackend();
+            break;
+        }
 
         final MXMLJSC mxmlc = new MXMLJSC(backend);
         final Set<ICompilerProblem> problems = new HashSet<ICompilerProblem>();

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c8275ed6/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/goog/JSGoogConfiguration.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/goog/JSGoogConfiguration.java b/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/goog/JSGoogConfiguration.java
index ae6a16c..621f38e 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/goog/JSGoogConfiguration.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/goog/JSGoogConfiguration.java
@@ -27,6 +27,7 @@ import org.apache.flex.compiler.clients.MXMLJSC;
 import org.apache.flex.compiler.config.ConfigurationValue;
 import org.apache.flex.compiler.exceptions.ConfigurationException;
 import org.apache.flex.compiler.internal.config.annotations.Config;
+import org.apache.flex.compiler.internal.config.annotations.FlexOnly;
 import org.apache.flex.compiler.internal.config.annotations.InfiniteArguments;
 import org.apache.flex.compiler.internal.config.annotations.Mapping;
 
@@ -67,6 +68,46 @@ public class JSGoogConfiguration extends JSConfiguration
     }
 
     //
+    // Override 'compiler.binding-value-change-event-type'
+    //
+
+    private String bindingValueChangeEventType = "valueChange";
+
+    @Override
+    public String getBindingValueChangeEventType()
+    {
+        return bindingValueChangeEventType;
+    }
+
+    @Override
+    @Config(advanced = true)
+    public void setCompilerBindingValueChangeEventType(ConfigurationValue cv, String b)
+    {
+        bindingValueChangeEventType = b;
+    }
+
+    //
+    // Override 'compiler.mxml.children-as-data'
+    //
+    
+    private Boolean childrenAsData = true;
+    
+    @Override
+    public Boolean getCompilerMxmlChildrenAsData()
+    {
+        return childrenAsData;
+    }
+
+    @Override
+    @Config
+    @Mapping({"compiler", "mxml", "children-as-data"})
+    @FlexOnly
+    public void setCompilerMxmlChildrenAsData(ConfigurationValue cv, Boolean asData) throws ConfigurationException
+    {
+        childrenAsData = asData;
+    }
+
+    //
     // 'marmotinni'
     //