You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by jo...@apache.org on 2025/05/05 21:54:39 UTC

(royale-asjs) branch develop updated (2a1603768d -> 123426ce4f)

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

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


    from 2a1603768d TourDeJewel: remove some use of font awesome non-free icons
     new 5bc236c5be FontAwesomeIcon: change faStyle property defaultsto SOLID instead of REGULAR
     new 47893a8040 BE0012_Using_external_javascript_libraries_in_Apache_Royale: updated for new included scripts/css/assets
     new 123426ce4f BE0011_Loading_external_data_through_HTTPService: option to load a mocked JSON response due to Content-Security-Policy restrictions

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../asconfig.json                                  |  8 +++-
 .../pom.xml                                        | 46 +++++++++++++++++-
 .../src/main/resources/mock-response.json          | 19 ++++++++
 ..._Loading_external_data_through_HTTPService.mxml | 17 ++++++-
 .../asconfig.json                                  |  9 +++-
 .../pom.xml                                        | 54 +++++++++++++++++++++-
 .../rat-excludes.txt                               |  0
 .../highlight.js/9.12.0/LICENSE-highlightjs        |  0
 .../highlight.js/9.12.0/atom-one-dark.min.css      |  0
 .../highlight.js/9.12.0/highlight.min.js           |  0
 .../resources/jewel-example-index-template.html    |  4 +-
 ...rnal_javascript_libraries_in_Apache_Royale.mxml |  4 +-
 .../src/main/royale/hljs.as                        | 13 ------
 .../org/apache/royale/icons/FontAwesomeIcon.as     |  2 +-
 14 files changed, 153 insertions(+), 23 deletions(-)
 create mode 100644 examples/blog/BE0011_Loading_external_data_through_HTTPService/src/main/resources/mock-response.json
 copy examples/{jewel/TourDeJewel => blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale}/rat-excludes.txt (100%)
 copy examples/{jewel/TourDeJewel => blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale}/src/main/assembly/third-party/highlight.js/9.12.0/LICENSE-highlightjs (100%)
 copy examples/{jewel/TourDeJewel => blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale}/src/main/assembly/third-party/highlight.js/9.12.0/atom-one-dark.min.css (100%)
 copy examples/{jewel/TourDeJewel => blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale}/src/main/assembly/third-party/highlight.js/9.12.0/highlight.min.js (100%)


(royale-asjs) 02/03: BE0012_Using_external_javascript_libraries_in_Apache_Royale: updated for new included scripts/css/assets

Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 47893a80409aac8fb84f4a23f89e5f8f582a51d7
Author: Josh Tynjala <jo...@apache.org>
AuthorDate: Mon May 5 12:56:32 2025 -0700

    BE0012_Using_external_javascript_libraries_in_Apache_Royale: updated for new included scripts/css/assets
    
    Fixed copying as3code.txt to both js-debug and js-release
---
 .../asconfig.json                                  |  9 +++-
 .../pom.xml                                        | 54 +++++++++++++++++++++-
 .../rat-excludes.txt                               | 22 +++++++++
 .../highlight.js/9.12.0/LICENSE-highlightjs        | 29 ++++++++++++
 .../highlight.js/9.12.0/atom-one-dark.min.css      | 34 ++++++++++++++
 .../highlight.js/9.12.0/highlight.min.js           |  3 ++
 .../resources/jewel-example-index-template.html    |  4 +-
 ...rnal_javascript_libraries_in_Apache_Royale.mxml |  4 +-
 .../src/main/royale/hljs.as                        | 13 ------
 9 files changed, 153 insertions(+), 19 deletions(-)

diff --git a/examples/blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale/asconfig.json b/examples/blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale/asconfig.json
index c3fe24592f..d849b9df92 100644
--- a/examples/blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale/asconfig.json
+++ b/examples/blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale/asconfig.json
@@ -23,10 +23,15 @@
         "targets": ["JSRoyale"],
         "source-map": true,
         "html-template": "src/main/resources/jewel-example-index-template.html",
-        "theme": "${royalelib}/themes/JewelTheme/src/main/resources/defaults.css"
+        "theme": "${royalelib}/themes/JewelTheme/src/main/resources/defaults.css",
+        "remove-circulars": true
     },
     "copySourcePathAssets": true,
-    "additionalOptions": "-remove-circulars -js-output-optimization=skipAsCoercions",
+    "additionalOptions": [
+        "-js-output-optimization=skipAsCoercions",
+        "-js-include-script+=src/main/assembly/third-party/highlight.js/9.12.0/highlight.min.js",
+        "-js-include-css+=src/main/assembly/third-party/highlight.js/9.12.0/atom-one-dark.min.css"
+    ],
     "files":
     [
         "src/main/royale/BE0012_Using_external_javascript_libraries_in_Apache_Royale.mxml"
diff --git a/examples/blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale/pom.xml b/examples/blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale/pom.xml
index 8305efb918..f027045f28 100644
--- a/examples/blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale/pom.xml
+++ b/examples/blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale/pom.xml
@@ -43,9 +43,61 @@
           <targets>${royale.targets}</targets>
           <debug>false</debug>
           <htmlTemplate>${basedir}/target/javascript/bin/js-debug/jewel-example-index-template.html</htmlTemplate>
-          <additionalCompilerOptions>-source-map=true;</additionalCompilerOptions>
+          <additionalCompilerOptions>
+            -source-map=true;
+            -js-include-script+=${basedir}/src/main/assembly/third-party/highlight.js/9.12.0/highlight.min.js;
+            -js-include-css+=${basedir}/src/main/assembly/third-party/highlight.js/9.12.0/atom-one-dark.min.css;
+          </additionalCompilerOptions>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.rat</groupId>
+        <artifactId>apache-rat-plugin</artifactId>
+        <version>0.16.1</version>
+        <configuration>
+          <excludesFile>${project.basedir}/rat-excludes.txt</excludesFile>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-resources-plugin</artifactId>
+        <version>3.1.0</version>
+        <executions>
+          <execution>
+            <id>copy-resources-debug</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>copy-resources</goal>
+            </goals>
+            <configuration>
+              <outputDirectory>${compiler.output-dir-debug}</outputDirectory>
+              <resources>
+                <resource>
+                  <directory>src/main/resources</directory>
+                  <filtering>true</filtering>
+                </resource>
+              </resources>
+            </configuration>
+          </execution>
+          <execution>
+            <id>copy-resources-release</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>copy-resources</goal>
+            </goals>
+            <configuration>
+              <!-- Copy the assets to the assets output directory -->
+              <outputDirectory>${compiler.output-dir-release}</outputDirectory>
+              <resources>
+                <resource>
+                  <directory>src/main/resources</directory>
+                  <filtering>true</filtering>
+                </resource>
+              </resources>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
 
diff --git a/examples/blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale/rat-excludes.txt b/examples/blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale/rat-excludes.txt
new file mode 100644
index 0000000000..16395e18e7
--- /dev/null
+++ b/examples/blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale/rat-excludes.txt
@@ -0,0 +1,22 @@
+################################################################################
+##
+##  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.
+##
+################################################################################
+
+# highlight.js is BSD-3-Clause
+src/main/assembly/third-party/highlight.js/9.12.0/atom-one-dark.min.css
+src/main/assembly/third-party/highlight.js/9.12.0/highlight.min.js
\ No newline at end of file
diff --git a/examples/blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale/src/main/assembly/third-party/highlight.js/9.12.0/LICENSE-highlightjs b/examples/blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale/src/main/assembly/third-party/highlight.js/9.12.0/LICENSE-highlightjs
new file mode 100644
index 0000000000..2250cc7eca
--- /dev/null
+++ b/examples/blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale/src/main/assembly/third-party/highlight.js/9.12.0/LICENSE-highlightjs
@@ -0,0 +1,29 @@
+BSD 3-Clause License
+
+Copyright (c) 2006, Ivan Sagalaev.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+  list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+
+* Neither the name of the copyright holder nor the names of its
+  contributors may be used to endorse or promote products derived from
+  this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/examples/blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale/src/main/assembly/third-party/highlight.js/9.12.0/atom-one-dark.min.css b/examples/blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale/src/main/assembly/third-party/highlight.js/9.12.0/atom-one-dark.min.css
new file mode 100644
index 0000000000..f2a2dad684
--- /dev/null
+++ b/examples/blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale/src/main/assembly/third-party/highlight.js/9.12.0/atom-one-dark.min.css
@@ -0,0 +1,34 @@
+/*
+////////////////////////////////////////////////////////////////////////////////
+//  BSD 3-Clause License
+//  
+//  Copyright (c) 2006, Ivan Sagalaev.
+//  All rights reserved.
+//  
+//  Redistribution and use in source and binary forms, with or without
+//  modification, are permitted provided that the following conditions are met:
+//  
+//  * Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+//  
+//  * Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+//  
+//  * Neither the name of the copyright holder nor the names of its
+//    contributors may be used to endorse or promote products derived from
+//    this software without specific prior written permission.
+//  
+//  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+//  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+//  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+//  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+//  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+//  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+//  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+//  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+//  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+//  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+////////////////////////////////////////////////////////////////////////////////
+*/
+.hljs{display:block;overflow-x:auto;padding:0.5em;color:#abb2bf;background:#282c34}.hljs-comment,.hljs-quote{color:#5c6370;font-style:italic}.hljs-doctag,.hljs-keyword,.hljs-formula{color:#c678dd}.hljs-section,.hljs-name,.hljs-selector-tag,.hljs-deletion,.hljs-subst{color:#e06c75}.hljs-literal{color:#56b6c2}.hljs-string,.hljs-regexp,.hljs-addition,.hljs-attribute,.hljs-meta-string{color:#98c379}.hljs-built_in,.hljs-class .hljs-title{color:#e6c07b}.hljs-attr,.hljs-variable,.hljs-template- [...]
\ No newline at end of file
diff --git a/examples/blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale/src/main/assembly/third-party/highlight.js/9.12.0/highlight.min.js b/examples/blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale/src/main/assembly/third-party/highlight.js/9.12.0/highlight.min.js
new file mode 100644
index 0000000000..f30a334c9d
--- /dev/null
+++ b/examples/blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale/src/main/assembly/third-party/highlight.js/9.12.0/highlight.min.js
@@ -0,0 +1,3 @@
+/*! highlight.js v9.12.0 | BSD3 License | git.io/hljslicense */
+!function(e){var t="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):t&&(t.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return t.hljs}))}(function(e){function t(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function r(e){return e.nodeName.toLowerCase()}function a(e,t){var r=e&&e.exec(t);return r&&0===r.index}function n(e){return E.test(e)}function i(e){var t,r,a,i,s=e.className+" ";i [...]
+var t="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",r={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",literal:"true false nil"},a={cN:"doctag",b:"@[A-Za-z]+"},n={b:"#<",e:">"},i=[e.C("#","$",{c:[a]}),e.C("^\\=begin","^\\=end",{c:[a],r:10}),e.C("^__END__" [...]
\ No newline at end of file
diff --git a/examples/blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale/src/main/resources/jewel-example-index-template.html b/examples/blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale/src/main/resources/jewel-example-index-template.html
index 140ba985a1..c4b9aa3ba5 100644
--- a/examples/blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale/src/main/resources/jewel-example-index-template.html
+++ b/examples/blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale/src/main/resources/jewel-example-index-template.html
@@ -17,11 +17,11 @@
 <!DOCTYPE html>
 <html>
 <head>
-	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <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">
     <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
     <link rel="stylesheet" type="text/css" href="${application}.css">
-    <link href="https://fonts.googleapis.com/css?family=Lato:400,700" rel="stylesheet">
 ${head}
 </head>
 <body>
diff --git a/examples/blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale/src/main/royale/BE0012_Using_external_javascript_libraries_in_Apache_Royale.mxml b/examples/blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale/src/main/royale/BE0012_Using_external_javascript_libraries_in_Apache_Royale.mxml
index 90991d61b5..31dfaa7956 100644
--- a/examples/blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale/src/main/royale/BE0012_Using_external_javascript_libraries_in_Apache_Royale.mxml
+++ b/examples/blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale/src/main/royale/BE0012_Using_external_javascript_libraries_in_Apache_Royale.mxml
@@ -55,7 +55,9 @@
                 </j:CardHeader>
                 <j:CardPrimaryContent>
 
-                    <j:Label html="This example uses hljs library to highligh a piece of code"/>
+                    <j:Label>
+                        <j:html><![CDATA[This example uses the <strong>hljs</strong> library to highlight some code]]></j:html>
+                    </j:Label>
 
                     <html:Pre height="300" width="100%" style="background-color: white">
                         <html:beads>
diff --git a/examples/blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale/src/main/royale/hljs.as b/examples/blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale/src/main/royale/hljs.as
index 1a045c7b7c..7f192f0a40 100644
--- a/examples/blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale/src/main/royale/hljs.as
+++ b/examples/blog/BE0012_Using_external_javascript_libraries_in_Apache_Royale/src/main/royale/hljs.as
@@ -24,19 +24,6 @@ package
 	COMPILE::JS
 	public class hljs
 	{
-		/** 
-         * <inject_script>
-		 * var script = document.createElement("script");
-		 * script.setAttribute("src", "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js");
-		 * document.head.appendChild(script);
-         * var link = document.createElement("link");
-         * link.setAttribute("rel", "stylesheet");
-         * link.setAttribute("title", "Atom One Dark");
-         * link.setAttribute("type", "text/css");
-         * link.setAttribute("href", "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css");
-         * document.head.appendChild(link);
-		 * </inject_script>
-		 */
 		public function hljs(){}
 
 		public static function highlightBlock(block:Element):void {}


(royale-asjs) 03/03: BE0011_Loading_external_data_through_HTTPService: option to load a mocked JSON response due to Content-Security-Policy restrictions

Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 123426ce4fe0866e624945590676a5db3a18a9d3
Author: Josh Tynjala <jo...@apache.org>
AuthorDate: Mon May 5 14:54:23 2025 -0700

    BE0011_Loading_external_data_through_HTTPService: option to load a mocked JSON response due to Content-Security-Policy restrictions
---
 .../asconfig.json                                  |  8 +++-
 .../pom.xml                                        | 46 +++++++++++++++++++++-
 .../src/main/resources/mock-response.json          | 19 +++++++++
 ..._Loading_external_data_through_HTTPService.mxml | 17 +++++++-
 4 files changed, 87 insertions(+), 3 deletions(-)

diff --git a/examples/blog/BE0011_Loading_external_data_through_HTTPService/asconfig.json b/examples/blog/BE0011_Loading_external_data_through_HTTPService/asconfig.json
index 5eaca27075..2939addd1c 100644
--- a/examples/blog/BE0011_Loading_external_data_through_HTTPService/asconfig.json
+++ b/examples/blog/BE0011_Loading_external_data_through_HTTPService/asconfig.json
@@ -23,7 +23,13 @@
         "targets": ["JSRoyale"],
         "source-map": true,
         "html-template": "src/main/resources/jewel-example-index-template.html",
-        "theme": "${royalelib}/themes/JewelTheme/src/main/resources/defaults.css"
+        "theme": "${royalelib}/themes/JewelTheme/src/main/resources/defaults.css",
+        "define": [
+            {
+                "name": "CONFIG::MOCK_RESPONSE",
+                "value": false
+            }
+        ]
     },
     "copySourcePathAssets": true,
     "additionalOptions": "-remove-circulars -js-output-optimization=skipAsCoercions",
diff --git a/examples/blog/BE0011_Loading_external_data_through_HTTPService/pom.xml b/examples/blog/BE0011_Loading_external_data_through_HTTPService/pom.xml
index fa007e94bf..bff998098b 100644
--- a/examples/blog/BE0011_Loading_external_data_through_HTTPService/pom.xml
+++ b/examples/blog/BE0011_Loading_external_data_through_HTTPService/pom.xml
@@ -43,9 +43,53 @@
           <targets>${royale.targets}</targets>
           <debug>false</debug>
           <htmlTemplate>${basedir}/target/javascript/bin/js-debug/jewel-example-index-template.html</htmlTemplate>
-          <additionalCompilerOptions>-source-map=true;-js-dynamic-access-unknown-members=true</additionalCompilerOptions>
+          <additionalCompilerOptions>
+            -source-map=true;
+            -js-dynamic-access-unknown-members=true;
+            -define+=CONFIG::MOCK_RESPONSE,false;
+          </additionalCompilerOptions>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-resources-plugin</artifactId>
+        <version>3.1.0</version>
+        <executions>
+          <execution>
+            <id>copy-resources-debug</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>copy-resources</goal>
+            </goals>
+            <configuration>
+              <outputDirectory>${compiler.output-dir-debug}</outputDirectory>
+              <resources>
+                <resource>
+                  <directory>src/main/resources</directory>
+                  <filtering>true</filtering>
+                </resource>
+              </resources>
+            </configuration>
+          </execution>
+          <execution>
+            <id>copy-resources-release</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>copy-resources</goal>
+            </goals>
+            <configuration>
+              <!-- Copy the assets to the assets output directory -->
+              <outputDirectory>${compiler.output-dir-release}</outputDirectory>
+              <resources>
+                <resource>
+                  <directory>src/main/resources</directory>
+                  <filtering>true</filtering>
+                </resource>
+              </resources>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
 
diff --git a/examples/blog/BE0011_Loading_external_data_through_HTTPService/src/main/resources/mock-response.json b/examples/blog/BE0011_Loading_external_data_through_HTTPService/src/main/resources/mock-response.json
new file mode 100644
index 0000000000..edd4cb0eb6
--- /dev/null
+++ b/examples/blog/BE0011_Loading_external_data_through_HTTPService/src/main/resources/mock-response.json
@@ -0,0 +1,19 @@
+{
+	"name": "BE0011_Loading_external_data_through_HTTPService.mxml",
+	"path": "examples/blog/BE0011_Loading_external_data_through_HTTPService/src/main/royale/BE0011_Loading_external_data_through_HTTPService.mxml",
+	"sha": "dd2590eb3bbf27e69f1bcc0912295f067b3a5fc6",
+	"size": 3647,
+	"url": "https://api.github.com/repos/apache/royale-asjs/contents/examples/blog/BE0011_Loading_external_data_through_HTTPService/src/main/royale/BE0011_Loading_external_data_through_HTTPService.mxml?ref=develop",
+	"html_url": "https://github.com/apache/royale-asjs/blob/develop/examples/blog/BE0011_Loading_external_data_through_HTTPService/src/main/royale/BE0011_Loading_external_data_through_HTTPService.mxml",
+	"git_url": "https://api.github.com/repos/apache/royale-asjs/git/blobs/dd2590eb3bbf27e69f1bcc0912295f067b3a5fc6",
+	"download_url": "https://raw.githubusercontent.com/apache/royale-asjs/develop/examples/blog/BE0011_Loading_external_data_through_HTTPService/src/main/royale/BE0011_Loading_external_data_through_HTTPService.mxml",
+	"type": "file",
+	"content": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCEtLQoK\nICBMaWNlbnNlZCB0byB0aGUgQXBhY2hlIFNvZnR3YXJlIEZvdW5kYXRpb24g\nKEFTRikgdW5kZXIgb25lIG9yIG1vcmUKICBjb250cmlidXRvciBsaWNlbnNl\nIGFncmVlbWVudHMuICBTZWUgdGhlIE5PVElDRSBmaWxlIGRpc3RyaWJ1dGVk\nIHdpdGgKICB0aGlzIHdvcmsgZm9yIGFkZGl0aW9uYWwgaW5mb3JtYXRpb24g\ncmVnYXJkaW5nIGNvcHlyaWdodCBvd25lcnNoaXAuCiAgVGhlIEFTRiBsaWNl\nbnNlcyB0aGlzIGZpbGUgdG8gWW91IHVuZGVyIHRoZSBBcGFjaGUgTGljZW5z\nZSwgVmVyc2lvbiAyLjAKICAodGhlICJMaWNlbnNlIik7I [...]
+	"encoding": "base64",
+	"_links": {
+	  "self": "https://api.github.com/repos/apache/royale-asjs/contents/examples/blog/BE0011_Loading_external_data_through_HTTPService/src/main/royale/BE0011_Loading_external_data_through_HTTPService.mxml?ref=develop",
+	  "git": "https://api.github.com/repos/apache/royale-asjs/git/blobs/dd2590eb3bbf27e69f1bcc0912295f067b3a5fc6",
+	  "html": "https://github.com/apache/royale-asjs/blob/develop/examples/blog/BE0011_Loading_external_data_through_HTTPService/src/main/royale/BE0011_Loading_external_data_through_HTTPService.mxml"
+	}
+  }
+  
\ No newline at end of file
diff --git a/examples/blog/BE0011_Loading_external_data_through_HTTPService/src/main/royale/BE0011_Loading_external_data_through_HTTPService.mxml b/examples/blog/BE0011_Loading_external_data_through_HTTPService/src/main/royale/BE0011_Loading_external_data_through_HTTPService.mxml
index dd2590eb3b..1ec6d5f2d0 100644
--- a/examples/blog/BE0011_Loading_external_data_through_HTTPService/src/main/royale/BE0011_Loading_external_data_through_HTTPService.mxml
+++ b/examples/blog/BE0011_Loading_external_data_through_HTTPService/src/main/royale/BE0011_Loading_external_data_through_HTTPService.mxml
@@ -31,6 +31,22 @@
 
             public function getGithubContent(event:MouseEvent):void
             {
+                if (CONFIG::MOCK_RESPONSE)
+                {
+                    // the ASF's servers are configured to block URL requests to
+                    // external APIs, so to display a working version of this
+                    // example on royale.apache.org, we load a JSON file that
+                    // is also on royale.apache.org.
+                    // this is still a valid demonstration of how to load data
+                    // files in a Royale app using HTTPService.
+                    service.sourceCodeUrl = "mock-response.json";
+                }
+                else
+                {
+                    // however, if CONFIG::MOCK_RESPONSE is false, we can make
+                    // a call to the real GitHub API
+                    service.sourceCodeUrl = "https://api.github.com/repos/apache/royale-asjs/contents/examples/blog/BE0011_Loading_external_data_through_HTTPService/src/main/royale/BE0011_Loading_external_data_through_HTTPService.mxml";
+                }
                 service.getContent();
             }
             
@@ -47,7 +63,6 @@
     
     <fx:Declarations>
         <services:GitHubService id="service" 
-            sourceCodeUrl="https://api.github.com/repos/apache/royale-asjs/contents/examples/blog/BE0011_Loading_external_data_through_HTTPService/src/main/royale/BE0011_Loading_external_data_through_HTTPService.mxml"
             dataReady="dataReadyHandler(event)"/> 
     </fx:Declarations>
 


(royale-asjs) 01/03: FontAwesomeIcon: change faStyle property defaultsto SOLID instead of REGULAR

Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 5bc236c5be38cca0fa4f46a4fa218506cdc12cc9
Author: Josh Tynjala <jo...@apache.org>
AuthorDate: Mon May 5 12:33:57 2025 -0700

    FontAwesomeIcon: change faStyle property defaultsto SOLID instead of REGULAR
    
    With the free version of Font Awesome, there are significantly more solid icons than regular icons. That should be our default, since we're including the free version of Font Awesome and not the paid pro version.
    
    For reference:
    
    Font Awesome 5 has 1001 solid icons vs 151 regular icons
    Font Awesome 6 has 1402 solid icons vs 163 regular icons
---
 .../Icons/src/main/royale/org/apache/royale/icons/FontAwesomeIcon.as    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/frameworks/projects/Icons/src/main/royale/org/apache/royale/icons/FontAwesomeIcon.as b/frameworks/projects/Icons/src/main/royale/org/apache/royale/icons/FontAwesomeIcon.as
index 006425892a..7484e3164e 100644
--- a/frameworks/projects/Icons/src/main/royale/org/apache/royale/icons/FontAwesomeIcon.as
+++ b/frameworks/projects/Icons/src/main/royale/org/apache/royale/icons/FontAwesomeIcon.as
@@ -91,7 +91,7 @@ package org.apache.royale.icons
                 addClass('fa');
         }
 
-        protected var _faStyle:String = REGULAR;
+        protected var _faStyle:String = SOLID;
         protected var _oldFaStyle:String;
         /**
          *  the font awesome 5 style.