B4J Question [BANano] [SOLVED] How to change the sequences of added css and js files from libraries?

Mashiane

Expert
Licensed User
Longtime User
Ola

I have created a core library and some extensions in separate libraries. On the Libraries listing these appear as follows:

Part1.png


NB: AddCssFile and AddJavaScriptFile are ONLY called in the libraries and not in my project referencing these libraries.

Whilst my project works and is not broken yet, its not following the recommended sequence of resources because the css and js files are added in a wrong sequence. How can I change this? This is clearly seen in this example..

B4X:
Merging CSS files...
  CSS files are merged in the order you added them
  --> C:\laragon\www\bvmdesigner\styles\info-box.min.css
  --> C:\laragon\www\bvmdesigner\styles\helpers.min.css
  --> C:\laragon\www\bvmdesigner\styles\roboto.min.css
  --> C:\laragon\www\bvmdesigner\styles\materialfont.min.css
  --> C:\laragon\www\bvmdesigner\styles\materialdesignicons.min.css
  --> C:\laragon\www\bvmdesigner\styles\vuetify.min.css
  --> C:\laragon\www\bvmdesigner\styles\prism.min.css
  --> C:\laragon\www\bvmdesigner\styles\devices.min.css
  --> C:\laragon\www\bvmdesigner\styles\quill.bubble.css
  --> C:\laragon\www\bvmdesigner\styles\quill.snow.css
  --> C:\laragon\www\bvmdesigner\styles\vue2-editor.css

Above here, I need to have the starting css file to always be

B4X:
--> C:\laragon\www\bvmdesigner\styles\roboto.min.css

And everything should be added after that as that is the first resource in the BANAnoVuetifyCode library. The library before it does not have css and js files.

Looking at the js resources also shows the same.

B4X:
Merging Javascript files...
-> JS files are merged in the order you added them.
  --> C:\laragon\www\bvmdesigner\scripts\vue-count-to.min.js
  --> C:\laragon\www\bvmdesigner\scripts\vue.min.js
  --> C:\laragon\www\bvmdesigner\scripts\vuetify.min.js
  --> C:\laragon\www\bvmdesigner\scripts\vue-router.min.js
  --> C:\laragon\www\bvmdesigner\scripts\fileSaver.min.js
  --> C:\laragon\www\bvmdesigner\scripts\jszip.min.js
  --> C:\laragon\www\bvmdesigner\scripts\prism.min.js
  --> C:\laragon\www\bvmdesigner\scripts\vue-prism-component.min.js
  --> C:\laragon\www\bvmdesigner\scripts\beautify.min.js
  --> C:\laragon\www\bvmdesigner\scripts\beautify-css.min.js
  --> C:\laragon\www\bvmdesigner\scripts\beautify-html.min.js
  --> C:\laragon\www\bvmdesigner\scripts\renderstring.min.js
  --> C:\laragon\www\bvmdesigner\scripts\quill.min.js
  --> C:\laragon\www\bvmdesigner\scripts\vue2-editor.umd.js
  --> C:\laragon\www\bvmdesigner\scripts\alasql.min.js

The starting resource SHOULD always be:

B4X:
  --> C:\laragon\www\bvmdesigner\scripts\vue.min.js

And all others added after that as that is the first resource in the BANAnoVuetifyCode library. Yes the other libraries do reference BANanoVuetifyCore.
Do I have to execute AddCSS... and AddJavaScript... also in my project referencing these libraries?

Thanks
 

alwaysbusy

Expert
Licensed User
Longtime User
Whilst my project works and is not broken yet
Probably because they are merged (it doesn't matter where something is within one javascript file). Not merged, there can be problems.

BANano can keep the order within one library, but has no idea how they are ordered between libraries. As this is one library that is split out in several other libraries this is the case here. To support this, this will require a whole new system within BANano.

Alwaysbusy
 
Upvote 0
Top