<script data-curl-run="/static/bundled/client.js,/static/run_client.js" src="/static/js/curl.js"></script>
var cfg = { baseUrl: "/static/js", packages: { rpc: { location: "dist/rpc", main: "jquery.jsonrpc.min.js", config: { loader: "curl/loader/legacy", exports: "jQuery", requires: ["jquery"] } } }, paths: { "jquery": "jquery.min.js", "underscore": "lodash.min.js", "backbone": { location: "backbone.js", config: { loader: "curl/loader/legacy", exports: "Backbone.noConflict()", requires: ["jquery", "underscore"] } }, "marionette": "backbone.marionette.min.js", "styles": "../css", "alertify": "alertify.min.js" }};
curl(cfg, ["app/client"]).then(function(client) { cfg.paths.bundles = app.rootUrl + "bundles/" curl(cfg) client.start()});
{ "baseUrl": "./js"}
-- John
cfg.paths.bundles = app.rootUrl + "bundles/"curl(cfg)
I'm sorry, I still can't figure this out.so I had to work it around using django template. if debug mode is on it loads run_client.js and if is not bundled client.js is loaded throw different script src.
Second issue is that these lineswill not work as expected, because curl modifies cfg somewhere inside, so when I call config again path to jquery.jsonrpc.min.js gets corrupted. I get somewhat like /static/js/dist/rpc/rpc/rpc/jquery.jsonrpc.min.js.
cfg.paths.bundles = app.rootUrl + "bundles/"curl(cfg)So I have to clone initial cfg object and use original one to reconfigure curl.
curl({ paths: { bundles: app.rootUrl + "bundles/" } });
curl({ paths: { bundles: app.rootUrl + "bundles/" } });
It sounds like this is what you want?.