Sample definition:
define('chartIQ', [], function () {
var STX, $$, $$$, STXChart, STXThirdParty; // ChartIQ globals
require.config({
packages:[
{
name: "stxAdvanced",
location: assetLocation + "/js",
main: "stxAdvanced.js"
},
{
name: "stxLibrary",
location: assetLocation + "/js",
main: "stxLibrary.js"
},
{
name: "stxKernelOs",
location: assetLocation + "/js",
main: "stxKernelOs.js"
},
{
name: "stxTimeZoneData",
location: assetLocation + "/js",
main: "stxTimeZoneData.js"
},
{
name: "stxThirdParty",
location: assetLocation + "/js",
main: "stxThirdParty.js"
},
{
name: "stx",
location: assetLocation + "/js",
main: "stx.js"
},
{
name: "chartiq/translations",
location: assetLocation + "/js",
main: "translations.js"
},
]
});
requirejs(["stxAdvanced","chartiq/translations", "stxThirdParty"], function(stxGlobals, translations, stxThirdParty) {
STX=stxGlobals.STX;
$$$=stxGlobals.$$$;
$$=stxGlobals.$$;
STXChart=stxGlobals.STXChart;
STXThirdParty=stxThirdParty;
});
});