Alloy.CFG
is a good, safe place to put globals in your Alloy applications so that you don't need to manage a commonjs module for globals yourself. It is also where your config.json configs get stored. It would likely be more intuitive for developers if they hada clear place to store globals. For this reason, I'd like to make the
Alloy.globals
namespace an empty object where developers can attach globals that they can then reference throughout the application.
It seems like a little bit of overlap with
Alloy.CFG
, but I think
Alloy.globals
is far more intuitive and and much more common use case.
alloy.js
// Alloy.globals by default equals {}
Alloy.globals.someGlobalFunction = function(){};
*Important*:
Alloy.globals
will erase the need for developers to roll their own globals libraries/namespaces.
Completed and currently in "binding" branch of the github repo
This is no in "master" and will be released with 0.3.2