summaryrefslogtreecommitdiff
path: root/lib/dojo/main.js.uncompressed.js
diff options
context:
space:
mode:
authorRichard Beales <[email protected]>2013-03-18 07:32:01 +0000
committerRichard Beales <[email protected]>2013-03-18 07:32:01 +0000
commit7c97d17aaf373339a8bcd917ad59ca6018148f0d (patch)
tree5a3c04f0f9529be392c1263d3feb75806eb43797 /lib/dojo/main.js.uncompressed.js
parent70db7424e7068701e60cc5bcdfe8f858be508179 (diff)
parentc670a80ddd9b03bd4ea6d940a9ed682fd26248d7 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'lib/dojo/main.js.uncompressed.js')
-rw-r--r--lib/dojo/main.js.uncompressed.js52
1 files changed, 52 insertions, 0 deletions
diff --git a/lib/dojo/main.js.uncompressed.js b/lib/dojo/main.js.uncompressed.js
new file mode 100644
index 000000000..a3dd80569
--- /dev/null
+++ b/lib/dojo/main.js.uncompressed.js
@@ -0,0 +1,52 @@
+define("dojo/main", [
+ "./_base/kernel", // kernel.isAsync
+ "./has",
+ "require",
+ "./sniff",
+ "./_base/lang",
+ "./_base/array",
+ "./_base/config",
+ "./ready",
+ "./_base/declare",
+ "./_base/connect",
+ "./_base/Deferred",
+ "./_base/json",
+ "./_base/Color",
+ "./has!dojo-firebug?./_firebug/firebug",
+ "./_base/browser",
+ "./_base/loader"
+], function(kernel, has, require, sniff, lang, array, config, ready){
+ // module:
+ // dojo/main
+ // summary:
+ // This is the package main module for the dojo package; it loads dojo base appropriate for the execution environment.
+
+ // the preferred way to load the dojo firebug console is by setting has("dojo-firebug") true in dojoConfig
+ // the isDebug config switch is for backcompat and will work fine in sync loading mode; it works in
+ // async mode too, but there's no guarantee when the module is loaded; therefore, if you need a firebug
+ // console guaranteed at a particular spot in an app, either set config.has["dojo-firebug"] true before
+ // loading dojo.js or explicitly include dojo/_firebug/firebug in a dependency list.
+ if(config.isDebug){
+ require(["./_firebug/firebug"]);
+ }
+
+ // dojoConfig.require is deprecated; use the loader configuration property deps
+ 1 || has.add("dojo-config-require", 1);
+ if( 1 ){
+ var deps= config.require;
+ if(deps){
+ // config.require may be dot notation
+ deps= array.map(lang.isArray(deps) ? deps : [deps], function(item){ return item.replace(/\./g, "/"); });
+ if(kernel.isAsync){
+ require(deps);
+ }else{
+ // this is a bit janky; in 1.6- dojo is defined before these requires are applied; but in 1.7+
+ // dojo isn't defined until returning from this module; this is only a problem in sync mode
+ // since we're in sync mode, we know we've got our loader with its priority ready queue
+ ready(1, function(){require(deps);});
+ }
+ }
+ }
+
+ return kernel;
+});