amber-smalltalk/amber — pull request #1039 by herby (2014-07-06 15:34:04+00:00)
Title: Loading of Helios with qs-passed baseUrl

(used to load config.js, thus have the right mappings).

Helios page now gets path to baseUrl settings in its querystring. Helios can be loaded in different scenarios, and it needs to know the mappings, which are in config.js at baseUrl.

Q: Why it worked fine pre-config and not now?

A: In pre-config, amber.js did some smart guesses as to where to find amber, helios, other libs and created the mappings in code. In config, this is built by amber config by searching the tree, and saved in config.js, no smart guesses any more. Mapping thus needs to be read from config.js, so helios/index.html must know where to find it.

As location of config.js can differ between scenarios: in app, in Amber development, in future as one of standard deps, requireJS's toUrl is used in popupHelios function to find correct url in scenario-agnostic fashion.