You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ca...@apache.org on 2021/02/27 16:40:18 UTC

[royale-asjs] branch develop updated: AppWithLib: add SampleLib dependency to AppWithLib example app

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

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


The following commit(s) were added to refs/heads/develop by this push:
     new 3b03488  AppWithLib: add SampleLib dependency to AppWithLib example app
3b03488 is described below

commit 3b03488413cbea70c85443dc339ed7063a06a2fc
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Sat Feb 27 17:38:18 2021 +0100

    AppWithLib: add SampleLib dependency to AppWithLib example app
---
 examples/jewel/AppWithLib/asconfig.json                   |  9 ++++++++-
 examples/jewel/AppWithLib/pom.xml                         |  8 ++++++++
 examples/jewel/AppWithLib/src/main/resources/default.css  |  1 +
 .../royale/org/apache/royale/examples/views/MainView.mxml | 15 ++++++++++++++-
 examples/jewel/AppWithLib/src/main/sass/_global.sass      |  1 +
 5 files changed, 32 insertions(+), 2 deletions(-)

diff --git a/examples/jewel/AppWithLib/asconfig.json b/examples/jewel/AppWithLib/asconfig.json
index c7cd803..040debd 100644
--- a/examples/jewel/AppWithLib/asconfig.json
+++ b/examples/jewel/AppWithLib/asconfig.json
@@ -22,7 +22,14 @@
         "debug": false,
         "targets": ["JSRoyale"],
         "source-path": [
-            "src/main/resources"
+            "src/main/resources",
+            "../SampleLib/src/main/royale/"
+        ],
+        "namespace": [
+            {
+                "uri": "library://ns.apache.org/royale/samplelib",
+                "manifest": "../SampleLib/src/main/resources/samplelib-manifest.xml"
+            }
         ],
         "source-map": true,
         "html-template": "src/main/resources/jewel-example-index-template.html",
diff --git a/examples/jewel/AppWithLib/pom.xml b/examples/jewel/AppWithLib/pom.xml
index dbbb1b4..03b87df 100644
--- a/examples/jewel/AppWithLib/pom.xml
+++ b/examples/jewel/AppWithLib/pom.xml
@@ -100,6 +100,14 @@
 
   <dependencies>
     <dependency>
+      <groupId>org.apache.royale.examples</groupId>
+      <artifactId>SampleLib</artifactId>
+      <version>0.9.8-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>js</classifier>
+    </dependency>
+    
+    <dependency>
       <groupId>org.apache.royale.framework</groupId>
       <artifactId>Core</artifactId>
       <version>0.9.8-SNAPSHOT</version>
diff --git a/examples/jewel/AppWithLib/src/main/resources/default.css b/examples/jewel/AppWithLib/src/main/resources/default.css
index 7497f0f..921f072 100644
--- a/examples/jewel/AppWithLib/src/main/resources/default.css
+++ b/examples/jewel/AppWithLib/src/main/resources/default.css
@@ -16,5 +16,6 @@
  */
 @namespace "http://www.w3.org/1999/xhtml";
 @namespace j "library://ns.apache.org/royale/jewel";
+@namespace j "library://ns.apache.org/royale/samplelib";
 
 /*# sourceMappingURL=default.css.map */
diff --git a/examples/jewel/AppWithLib/src/main/royale/org/apache/royale/examples/views/MainView.mxml b/examples/jewel/AppWithLib/src/main/royale/org/apache/royale/examples/views/MainView.mxml
index fcb3f77..8f4c888 100644
--- a/examples/jewel/AppWithLib/src/main/royale/org/apache/royale/examples/views/MainView.mxml
+++ b/examples/jewel/AppWithLib/src/main/royale/org/apache/royale/examples/views/MainView.mxml
@@ -19,8 +19,21 @@ limitations under the License.
 -->
 <j:View xmlns:fx="http://ns.adobe.com/mxml/2009"
     xmlns:j="library://ns.apache.org/royale/jewel"
-    xmlns:js="library://ns.apache.org/royale/basic">
+    xmlns:js="library://ns.apache.org/royale/basic"
+    initComplete="initView()">
     
+    <fx:Script>
+        <![CDATA[
+            import org.apache.royale.examples.SampleClass;
+
+            public function initView():void
+            {
+                var s:SampleClass = new SampleClass;
+                s.doSomething();
+            }
+        ]]>
+    </fx:Script>
+
     <j:VGroup>
         <j:Label text="Hello Jewel + Crux!"/>
     </j:VGroup>
diff --git a/examples/jewel/AppWithLib/src/main/sass/_global.sass b/examples/jewel/AppWithLib/src/main/sass/_global.sass
index 4245094..450aa02 100644
--- a/examples/jewel/AppWithLib/src/main/sass/_global.sass
+++ b/examples/jewel/AppWithLib/src/main/sass/_global.sass
@@ -19,6 +19,7 @@
 
 @namespace "http://www.w3.org/1999/xhtml"
 @namespace j "library://ns.apache.org/royale/jewel"
+@namespace j "library://ns.apache.org/royale/samplelib"
 
 // .jewel
 //     .label