Page 1 of 3

ordering load of javascript files

Posted: Thu Jun 23, 2016 8:24 am
by Paul Medawar

Hi,

I've loaded Velocity JS and using it for various animations with no issues. I have added the additional velocityUI pack, and it comes after velocity js in the order of my javascript files.

The problem i am having is the console is telling me

"Velocity UI Pack: Velocity must be loaded first. Aborting."

why is velocity not loading before the UI pack, when they are in the correct order?


ordering load of javascript files

Posted: Thu Jun 23, 2016 10:24 am
by Paul Medawar

I've managed to get around this by naming velocity (zvelocity). It then places it after velocity UI and works.

So i'm thinking that maybe they are ordered in reverse of what is seen in the builder?


ordering load of javascript files

Posted: Thu Jun 23, 2016 11:40 am
by Serhii Kulibaba

Hello Paul,

You are right.
It is possible to change the order only in AngularJS projects: https://docs.appery.io/docs/appbuilder-ionic-dependency-manager


ordering load of javascript files

Posted: Wed Jun 29, 2016 5:51 am
by Paul Medawar

Hi Sergiy,

I spoke too soon, the workaround has now stopped working.

Are you telling me there is no way to workaround this problem in Appery Jquery build?

Loading Javascript plugins in order should be available no?


ordering load of javascript files

Posted: Wed Jun 29, 2016 6:22 am
by Paul Medawar

I've managed to work around this again by trial and error with loading the javascripts, and trying different names for them.

The problem is it looks like the Appery builder is loading Javascript files randomly, which means that i'm going to have repeat this process in the future.

Is there any plan to allow correct ordering of javascript plugins in the future?


ordering load of javascript files

Posted: Tue Jul 19, 2016 7:39 am
by Paul Medawar

Hi, any response on this?


ordering load of javascript files

Posted: Tue Jul 19, 2016 8:01 am
by Illya Stepanov

Hi Paul -

As a working workaround you can use emApp settings - External resources - User-defined resources/em

-- specify there a relative path to the resource loaded in the Source tab.

The order in which they are given, will be the same way for how they will be loaded.


ordering load of javascript files

Posted: Tue Jul 19, 2016 8:17 am
by Paul Medawar

Hi Illya,

thanks for the quick response.

What would the path be if my folder structure is

WEB_RESOURCES
JS
velocity.js


ordering load of javascript files

Posted: Thu Jul 21, 2016 11:14 am
by Serhii Kulibaba

It has to be like:

pre../js/velocity.js/pre


ordering load of javascript files

Posted: Thu Jul 28, 2016 8:37 am
by Paul Medawar

Hi Sergiy,

I'm going as stated (see screenshot) with no affect on load order?

Image