B4J Question [BANano] Assets not added in the .dependsOn file of the b4xlib

Toky Olivier

Active Member
Licensed User
Longtime User
Hello,

When compiling to b4xlib, assets files (font files that I put already in the Files folder) are not added in the file myLibrary.dependsOn in the produced b4xlib file. I need to add them manually after libary compilation or there is a sub to call to add them? I see BANano.DependsOnAsset but it doesn't work. Only files added with the lines below are in the file:
B4X:
BANano.Header.AddCSSFile("myfile.min.css")
BANano.Header.AddJavascriptFile("myfile.min.js")
What I did is I opened the file in 7-zip and modified them manually but I don't want to do this every time.
 
Solution
Did you press sync in de B4J IDE? BANano does use the info in the .b4j file to build the .dependsOn file. (For this reason you can also not have folders in your assets files as the B4J IDE does not support that).

It is not the functionality of the BANanoDependsOnAsset() method to ADD files. The BANano Transpiler can use these directives and ONLY add them to your FINAL Web App IF you do use a SKDatePicker in your Web App! So if you do not use them, those Assets will not be loaded, hence making your final Web App a lot lighter.

Alwaysbusy

alwaysbusy

Expert
Licensed User
Longtime User
Did you press sync in de B4J IDE? BANano does use the info in the .b4j file to build the .dependsOn file. (For this reason you can also not have folders in your assets files as the B4J IDE does not support that).

It is not the functionality of the BANanoDependsOnAsset() method to ADD files. The BANano Transpiler can use these directives and ONLY add them to your FINAL Web App IF you do use a SKDatePicker in your Web App! So if you do not use them, those Assets will not be loaded, hence making your final Web App a lot lighter.

Alwaysbusy
 
Upvote 0
Solution

alwaysbusy

Expert
Licensed User
Longtime User
The next release will have the ability to add a zip file (with subfolders) to the Files tab that will be unzipped on .Build() to the root of your WebApp. Such a system did already exist for final WebApps, but now it will also be possible to do so in BANanoLibraries.

Can you mark my answer as the solution? Thanks!

Alwaysbusy
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…