Jewel.swc is not supposed to contain scripts/web-animations.min.js. Jewel.swc is the Flash version and JewelJS.swc is the JS version. The included scripts/styles/assets are intended for JS only.
-- Josh Tynjala Bowler Hat LLC https://bowlerhat.dev/ On Wed, Mar 12, 2025 at 5:49 PM Maria Jose Esteve <mjest...@iest.com> wrote: > Latest build: > - Updated royale-compiler, js-include-asset option. > - Ant compilation, JewelJS, includes <js-include-script> in the > compile-js-config.xml file > - Results: > -> Jewel.swc: DOES NOT contain the js/scripts/web-animations.min.js > file > -> JewelJS.swc: DOES contain the js/scripts/web-animations.min.js file > -> TDJ - asconfigc - js-release/js-debug: > -* Index.html correct, includes the expected <link> and > <script> tags, including Jewel's dependency on web-animations.min.js > -* The /scripts and /css folders exist > -> TDJ - Maven - js-release/js-debug: > -* Index.html correct, includes the expected <link> and > <script> tags, including Jewel's dependency on web-animations.min.js > -* The /scripts and /css folders exist > > All It works fine; the only question is why Jewel.swc doesn't contain > scripts/web-animations.min.js > Any ideas? > > Hiedra > > -----Mensaje original----- > De: Maria Jose Esteve <mjest...@iest.com> > Enviado el: jueves, 13 de marzo de 2025 0:38 > Para: dev@royale.apache.org > Asunto: RE: [apache/royale-asjs] Apache Royale Tour de Jewel - broken > (Issue #1252) > > '--------------- > Assuming that you added web-animations.min.js to Jewel, you can > unzip frameworks/js/libs/JewelJS.swc and check that it contains > js/scripts/web-animations.min.js. > '--------------- > Before compiling today's changes, Jewel.swc "didn't contain the files" (I > was surprised because everything worked, but it didn't contain them). > Another interesting fact... the JewelJS.swc and Jewel.swc files were the > same. Is this supposed to be the case? > After the new compilation... Jewel.swc still doesn't contain the 'scripts' > folder, but JewelJS.swc does (it didn't before) > > '--------------- > Additionally, you could build TourDeJewel and check that > scripts/web-animations.min.js exists in the output directory and that > index.html includes a <script> tag for it. > '--------------- > I was already doing this before modifying compile-js-config.xml. I tried > compiling via pom.xml and asconfig.json. In both cases, it created the > 'css' and 'scripts' directories and everything worked fine, including > web-animations.min.js (from Jewel). > I just compiled it again (Maven and asconfigc) and everything is fine with > asconfigc, but with Maven, the web-animations.min.js file is not copied to > the 'scripts' directory, nor is the corresponding <script ... src> tag > created: > > TDJ. (bin\js-release|js-debug) Index.html: > ... > <link rel="stylesheet" type="text/css" > href="css\atom-one-dark.min.css"> > <link rel="stylesheet" type="text/css" href="css\Lato400_700.css"> > <script type="text/javascript" > src="scripts\web-animations.min.js"></script> <<<<<<<<<<<<<<< > <script type="text/javascript" > src="scripts\highlight.min.js"></script> > <script type="text/javascript" src="./App.js"></script> </head> > > TDJ. (target\javascript\bin\js-release|js-debug) Index.html: > > <link rel="stylesheet" type="text/css" > href="css\atom-one-dark.min.css"> > <link rel="stylesheet" type="text/css" href="css\Lato400_700.css"> > <<<<<<<<<<<< > <<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > <script type="text/javascript" > src="scripts\highlight.min.js"></script> > <script type="text/javascript" src="./App.js"></script> </head> > > I'm going to recompile the SDK with and without today's changes > (compiler-js-...) and do the checks again. I'll come back with the results. > > Hiedra > > -----Mensaje original----- > De: Josh Tynjala <joshtynj...@bowlerhat.dev> Enviado el: miércoles, 12 de > marzo de 2025 23:12 > Para: dev@royale.apache.org > Asunto: Re: [apache/royale-asjs] Apache Royale Tour de Jewel - broken > (Issue #1252) > > Assuming that you added web-animations.min.js to Jewel, you can unzip > frameworks/js/libs/JewelJS.swc and check that it contains > js/scripts/web-animations.min.js. > > Additionally, you could build TourDeJewel and check that > scripts/web-animations.min.js exists in the output directory and that > index.html includes a <script> tag for it. > > -- > Josh Tynjala > Bowler Hat LLC > https://bowlerhat.dev/ > > > On Wed, Mar 12, 2025 at 3:07 PM Maria Jose Esteve <mjest...@iest.com> > wrote: > > > I must be blind... I can't see the difference between yesterday's > > build log and today's. > > I modified the config-js-config.xml file by adding the block. I know > > it's working because I made a mistake in my first test and put the > > <js-include-script> block inside <compiler> and got an error during > > the build itself. Since I'm not one for leaps of faith, how do I > > verify that I've included it correctly in the ANT build? > > > > Hiedra > > > > -----Mensaje original----- > > De: Maria Jose Esteve <mjest...@iest.com> Enviado el: miércoles, 12 de > > marzo de 2025 18:30 > > Para: dev@royale.apache.org > > Asunto: RE: [apache/royale-asjs] Apache Royale Tour de Jewel - broken > > (Issue #1252) > > > > Ok, I'll check it. > > Hiedra > > > > -----Mensaje original----- > > De: Josh Tynjala <joshtynj...@bowlerhat.dev> Enviado el: miércoles, 12 > > de marzo de 2025 17:54 > > Para: dev@royale.apache.org > > Asunto: Re: [apache/royale-asjs] Apache Royale Tour de Jewel - broken > > (Issue #1252) > > > > 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/scrip > > ts/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-anim > > > at > > > ions.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-26982 > > > 98 > > > 577>, > > > or unsubscribe< > > > https://github.com/notifications/unsubscribe-auth/ANJL3U4PT7OIPW7D5E > > > VN > > > UED2SXJ7DAVCNFSM6AAAAABWNZIIOCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TU > > > HM > > > ZDMOJYGI4TQNJXG4 > > > >. > > > 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-26982 > > > 98 > > > 577> > > > > > > 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-anim > > > at > > > ions.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-26982 > > > 98 > > > 577>, > > > or unsubscribe< > > > https://github.com/notifications/unsubscribe-auth/ANJL3U4PT7OIPW7D5E > > > VN > > > UED2SXJ7DAVCNFSM6AAAAABWNZIIOCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TU > > > HM > > > ZDMOJYGI4TQNJXG4 > > > >. > > > 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>> > > > > > >