Hi Hiedra,

Unfortunately, the Ant build does not include your changes yet. You should
add the js-include-script and js-include-css options in the
compile-js-config.xml files for each project.

For Jewel, that would be in this file:

https://github.com/apache/royale-asjs/blob/examples/TDJ_localresources/frameworks/js/projects/JewelJS/src/main/config/compile-js-config.xml

Notice that this file is located in frameworks/js/projects/JewelJS and not
frameworks/projects/Jewel.

Here's an example of js-include-script for web-animations.min.js in Jewel:

<js-include-script>

<path-element>../../../../../../projects/Jewel/src/main/assembly/scripts/web-animations/2.3.1/web-animations.min.js</path-element>
</js-include-script>

The path is relative to the compile-js-config.xml file (please update
royale-compiler with my changes from today because I fixed a bug resolving
paths in config.xml files).

--
Josh Tynjala
Bowler Hat LLC
https://bowlerhat.dev/


On Tue, Mar 11, 2025 at 5:55 AM Maria Jose Esteve <mjest...@iest.com> wrote:

> First step done. I've included web-animations.min.js in Jewel's swc and
> modified the TabBarView.as class
> I've compiled royale-asjs with Maven and ant and then tested TDJ and
> everything works as expected. Can someone else try compiling the
> “examples/TDJ_localresources” branch and verify that there are no issues
> before merging it into develop?
>
> Thx
>
> Hiedra
>
> De: Josh Tynjala <notificati...@github.com>
> Enviado el: martes, 4 de marzo de 2025 17:45
> Para: apache/royale-asjs <royale-a...@noreply.github.com>
> CC: Maria Jose Esteve <mjest...@iest.com>; Comment <
> comm...@noreply.github.com>
> Asunto: Re: [apache/royale-asjs] Apache Royale Tour de Jewel - broken
> (Issue #1252)
>
>
> As an example, Jewel's TabBarView contains the following <inject_script>
> that links to a JS library on Cloudflare. That's not going to work anymore.
>
> <inject_script>
>
> var script = document.createElement("script");
>
> script.setAttribute("src", "
> https://cdnjs.cloudflare.com/ajax/libs/web-animations/2.3.1/web-animations.min.js
> ");
>
> document.head.appendChild(script);
>
> </inject_script>
>
> We're going to need to change TabBarView (and any other classes in
> royale-asjs that use <inject_script> to load files from CDNs) to provide
> that script file in a different way.
>
> I recently added a -js-include-script option to royale-compiler. That's
> probably our best bet. It includes the .js file in the .swc file (or in the
> compiled app), and it automatically adds a <script> tag to the .html file.
>
> In Jewel, we might use it like this (assuming that web-animations.min.js
> is added to our repo at that location):
>
> -js-include-script+=src/main/assembly/scripts/web-animations.min.js
>
> That means that we'll need to include web-animations.min.js in the Royale
> distribution. Hopefully, all of the scripts that we're referencing have
> compatible licenses that the ASF accepts.
>
> —
> Reply to this email directly, view it on GitHub<
> https://github.com/apache/royale-asjs/issues/1252#issuecomment-2698298577>,
> or unsubscribe<
> https://github.com/notifications/unsubscribe-auth/ANJL3U4PT7OIPW7D5EVNUED2SXJ7DAVCNFSM6AAAAABWNZIIOCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOJYGI4TQNJXG4
> >.
> You are receiving this because you commented.Message ID:
> <apache/royale-asjs/issues/1252/2698298...@github.com<mailto:apache
> /royale-asjs/issues/1252/2698298...@github.com>>
> [joshtynjala]joshtynjala left a comment (apache/royale-asjs#1252)<
> https://github.com/apache/royale-asjs/issues/1252#issuecomment-2698298577>
>
> As an example, Jewel's TabBarView contains the following <inject_script>
> that links to a JS library on Cloudflare. That's not going to work anymore.
>
> <inject_script>
>
> var script = document.createElement("script");
>
> script.setAttribute("src", "
> https://cdnjs.cloudflare.com/ajax/libs/web-animations/2.3.1/web-animations.min.js
> ");
>
> document.head.appendChild(script);
>
> </inject_script>
>
> We're going to need to change TabBarView (and any other classes in
> royale-asjs that use <inject_script> to load files from CDNs) to provide
> that script file in a different way.
>
> I recently added a -js-include-script option to royale-compiler. That's
> probably our best bet. It includes the .js file in the .swc file (or in the
> compiled app), and it automatically adds a <script> tag to the .html file.
>
> In Jewel, we might use it like this (assuming that web-animations.min.js
> is added to our repo at that location):
>
> -js-include-script+=src/main/assembly/scripts/web-animations.min.js
>
> That means that we'll need to include web-animations.min.js in the Royale
> distribution. Hopefully, all of the scripts that we're referencing have
> compatible licenses that the ASF accepts.
>
> —
> Reply to this email directly, view it on GitHub<
> https://github.com/apache/royale-asjs/issues/1252#issuecomment-2698298577>,
> or unsubscribe<
> https://github.com/notifications/unsubscribe-auth/ANJL3U4PT7OIPW7D5EVNUED2SXJ7DAVCNFSM6AAAAABWNZIIOCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOJYGI4TQNJXG4
> >.
> You are receiving this because you commented.Message ID:
> <apache/royale-asjs/issues/1252/2698298...@github.com<mailto:apache
> /royale-asjs/issues/1252/2698298...@github.com>>
>

Reply via email to