MDL Example project

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

Branch: refs/heads/feature/mdl
Commit: 54f32ceea5ae4ba085f9d0676d184de8eb67d5fc
Parents: 32d80e4
Author: Carlos Rovira <carlosrov...@apache.org>
Authored: Fri Oct 14 23:05:39 2016 +0200
Committer: Carlos Rovira <carlosrov...@apache.org>
Committed: Sun Nov 6 02:28:52 2016 +0100

----------------------------------------------------------------------
 examples/flexjs/MDLExample/.vscode/launch.json  |  21 ++++
 examples/flexjs/MDLExample/.vscode/tasks.json   |  11 ++
 examples/flexjs/MDLExample/asconfig.json        |  14 +++
 examples/flexjs/MDLExample/pom.xml              | 112 +++++++++++++++++++
 .../flexjs/MDLExample/src/main/flex/App.mxml    |  39 +++++++
 .../MDLExample/src/main/resources/Unknown.jpeg  | Bin 0 -> 50531 bytes
 .../main/resources/mdl-js-index-template.html   |  32 ++++++
 .../src/main/resources/mdl-styles.css           |  32 ++++++
 examples/flexjs/pom.xml                         |   1 +
 9 files changed, 262 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/54f32cee/examples/flexjs/MDLExample/.vscode/launch.json
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/.vscode/launch.json 
b/examples/flexjs/MDLExample/.vscode/launch.json
new file mode 100644
index 0000000..4fec2c2
--- /dev/null
+++ b/examples/flexjs/MDLExample/.vscode/launch.json
@@ -0,0 +1,21 @@
+{
+    "version": "0.2.0",
+    "configurations": [
+        {
+            "name": "Launch Chrome against debug.html, with sourcemaps",
+            "type": "chrome",
+            "request": "launch",
+            "file": 
"${workspaceRoot}/target/javascript/bin/js-debug/index.html",
+            "sourceMaps": true,
+            "preLaunchTask": ""
+        },
+        {
+            "name": "Launch Firefox against debug.html, with sourcemaps",
+            "type": "firefox",
+            "request": "launch",
+            "file": "${workspaceRoot}/debug.html",
+            "sourceMaps": true,
+            "preLaunchTask": "asconfigc"
+        }
+    ]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/54f32cee/examples/flexjs/MDLExample/.vscode/tasks.json
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/.vscode/tasks.json 
b/examples/flexjs/MDLExample/.vscode/tasks.json
new file mode 100644
index 0000000..ac2c02d
--- /dev/null
+++ b/examples/flexjs/MDLExample/.vscode/tasks.json
@@ -0,0 +1,11 @@
+{
+       // See https://go.microsoft.com/fwlink/?LinkId=733558
+       // for the documentation about the tasks.json format
+       "version": "0.1.0",
+       "command": "asconfigc",
+       "isShellCommand": true,
+       "args": [
+               "--flexHome=/Users/carlosrovira/Dev/Flex/sdks/flexjs-0.8.0"
+       ],
+       "showOutput": "always"
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/54f32cee/examples/flexjs/MDLExample/asconfig.json
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/asconfig.json 
b/examples/flexjs/MDLExample/asconfig.json
new file mode 100644
index 0000000..d15de04
--- /dev/null
+++ b/examples/flexjs/MDLExample/asconfig.json
@@ -0,0 +1,14 @@
+{
+    "config": "flex",
+    "compilerOptions": {
+        "debug": true,
+        "source-map": true,
+        "js-output-type": "flexjs",
+        "output": "./target/javascript"
+    },
+    "additionalOptions": 
"-html-template=src/main/resources/mdl-js-index-template.html",
+    "files":
+    [
+        "src/main/flex/App.mxml"
+    ]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/54f32cee/examples/flexjs/MDLExample/pom.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/pom.xml 
b/examples/flexjs/MDLExample/pom.xml
new file mode 100644
index 0000000..207dab5
--- /dev/null
+++ b/examples/flexjs/MDLExample/pom.xml
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.flex.flexjs.examples</groupId>
+    <artifactId>examples-flexjs</artifactId>
+    <version>0.8.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>MDLExample</artifactId>
+  <version>0.8.0-SNAPSHOT</version>
+  <packaging>swf</packaging>
+
+  <name>Apache Flex - FlexJS: Examples: FlexJS: MDLExample</name>
+
+  <build>
+    <sourceDirectory>src/main/flex</sourceDirectory>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.flex.flexjs.compiler</groupId>
+        <artifactId>flexjs-maven-plugin</artifactId>
+        <extensions>true</extensions>
+        <configuration>
+          <flashVersion>20.0</flashVersion>
+          <mainClass>App.mxml</mainClass>
+        </configuration>
+        <executions>
+          <!-- Add a second execution with output set to JavaScript (Flash is 
the default) -->
+          <execution>
+            <id>compile-javascript</id>
+            <phase>compile</phase>
+            <goals>
+              <goal>compile-app</goal>
+            </goals>
+            <configuration>
+              <outputJavaScript>true</outputJavaScript>
+              
<htmlTemplate>${basedir}/src/main/resources/mdl-js-index-template.html</htmlTemplate>
+            </configuration>
+          </execution>
+        </executions>
+        <dependencies>
+          <dependency>
+            <groupId>org.apache.flex.flexjs.compiler</groupId>
+            <artifactId>compiler-jx</artifactId>
+            <version>0.8.0-SNAPSHOT</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.flex.flexjs.framework</groupId>
+      <artifactId>Core</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <type>swc</type>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.apache.flex.flexjs.framework</groupId>
+      <artifactId>MaterialDesignLite</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <type>swc</type>
+    </dependency>
+
+    <!-- Needed for Flash compilation -->
+    <dependency>
+      <groupId>com.adobe.flash.framework</groupId>
+      <artifactId>playerglobal</artifactId>
+      <version>20.0</version>
+      <type>swc</type>
+      <scope>provided</scope>
+    </dependency>
+
+    <!-- Needed for JavaScript compilation -->
+    <dependency>
+      <groupId>org.apache.flex.flexjs.framework</groupId>
+      <artifactId>HTML</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <type>swc</type>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.flex.flexjs.framework</groupId>
+      <artifactId>Language</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <type>swc</type>
+    </dependency>
+  </dependencies>
+
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/54f32cee/examples/flexjs/MDLExample/src/main/flex/App.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/App.mxml 
b/examples/flexjs/MDLExample/src/main/flex/App.mxml
new file mode 100644
index 0000000..4ad2a62
--- /dev/null
+++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009";
+                xmlns:js="library://ns.apache.org/flexjs/basic"
+                xmlns:local="*"
+                xmlns:mdl="library://ns.apache.org/flexjs/mdl">
+    
+    <js:valuesImpl>
+        <js:SimpleCSSValuesImpl />
+    </js:valuesImpl>
+
+    <js:initialView>
+        <js:View>
+            
+            <js:Button className="mdl-button mdl-js-button mdl-button--fab 
mdl-button--colored">
+               
+            </js:Button>
+
+            <mdl:Button/>
+        </js:View>
+    </js:initialView>
+</js:Application>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/54f32cee/examples/flexjs/MDLExample/src/main/resources/Unknown.jpeg
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/resources/Unknown.jpeg 
b/examples/flexjs/MDLExample/src/main/resources/Unknown.jpeg
new file mode 100644
index 0000000..08fb201
Binary files /dev/null and 
b/examples/flexjs/MDLExample/src/main/resources/Unknown.jpeg differ

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/54f32cee/examples/flexjs/MDLExample/src/main/resources/mdl-js-index-template.html
----------------------------------------------------------------------
diff --git 
a/examples/flexjs/MDLExample/src/main/resources/mdl-js-index-template.html 
b/examples/flexjs/MDLExample/src/main/resources/mdl-js-index-template.html
new file mode 100644
index 0000000..9eaf780
--- /dev/null
+++ b/examples/flexjs/MDLExample/src/main/resources/mdl-js-index-template.html
@@ -0,0 +1,32 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!DOCTYPE html>
+<html>
+<head>
+       <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+       <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+       <meta name="Custom Template for injecting custom style CSS">
+       <link rel="stylesheet" type="text/css" href="${application}.css">
+  <link rel="stylesheet" 
href="https://fonts.googleapis.com/icon?family=Material+Icons";>
+  <link rel="stylesheet" 
href="https://code.getmdl.io/1.2.1/material.indigo-pink.min.css";>
+  <script defer src="https://code.getmdl.io/1.2.1/material.min.js";></script>
+${head}
+</head>
+<body>
+${body}
+</body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/54f32cee/examples/flexjs/MDLExample/src/main/resources/mdl-styles.css
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/resources/mdl-styles.css 
b/examples/flexjs/MDLExample/src/main/resources/mdl-styles.css
new file mode 100644
index 0000000..6a07905
--- /dev/null
+++ b/examples/flexjs/MDLExample/src/main/resources/mdl-styles.css
@@ -0,0 +1,32 @@
+/*
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+*/
+
+.demo-card-wide.mdl-card {
+  width: 512px;
+}
+.demo-card-wide > .mdl-card__title {
+  color: #fff;
+  height: 176px;
+  background: url('welcome_card.jpg') center / cover;
+}
+.demo-card-wide > .mdl-card__menu {
+  color: #fff;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/54f32cee/examples/flexjs/pom.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/pom.xml b/examples/flexjs/pom.xml
index 08a2c1c..dc2e840 100644
--- a/examples/flexjs/pom.xml
+++ b/examples/flexjs/pom.xml
@@ -48,6 +48,7 @@
     <module>FlexWebsiteStatsViewer</module>
     <module>HelloWorld</module>
     <module>MapSearch</module>
+    <module>MDLExample</module>
     <module>MobileMap</module>
     <module>MobileStocks</module>
     <module>MobileTrader</module>

Reply via email to