qooxdoo - Include Library (jQuery) -
i want include 2 libraries (jquery, highcharts). tried add them additional-js in config.json file:
"additional-js" : { "add-script" : [ { "uri" : "script/jquery-3.1.0.min.js" }, { "uri" : "script/highcharts.js" } ] }, the problem is, sequence of includes changed build. after build highcharts.js first included one. how can manage sequence?
and here direct answer question:
i've tested fresh created app , sequence given in config.json preserved.
first have place files of additional libraries in right path of app (here called myapp) in
myapp/source/resource/scripts/jquery.js myapp/source/resource/scripts/highcharts.js then add folling entry in job section of myapp/config.json
"jobs" : { "common" : { "add-script" : [ { "uri" : "resource/scripts/jquery.js" }, { "uri" : "resource/scripts/highcharts.js" } ] }, and add @asset(scripts/*) compiler hint somewhere in app code, e.g. in application.jslike this
/** * main application class of custom application "myapp" * * @asset(myapp/*) * @asset(scripts/*) */ this way app loader loads first jquery.js , highcharts.jsin both source , build version.
and note qooxdoo loader responsible loading additional libraries. don't have , shouldn't place script tags libraries in index.html!
Comments
Post a Comment