-
Notifications
You must be signed in to change notification settings - Fork 10
/
boot.js
34 lines (31 loc) · 1.05 KB
/
boot.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Retrieve the module name from the command line (it will take the
// last argument)
var loadModule = process.argv[process.argv.length - 1];
// Inform the user what module is being loaded
console.log("Bootstrapping: '" + loadModule + "'...");
// Configuration Object for Dojo Loader:
dojoConfig = {
baseUrl: "src/", // Where we will put our packages
async: 1, // We want to make sure we are using the "modern" loader
hasCache: {
"host-node": 1, // Ensure we "force" the loader into NodeJS mode
"dom": 0 // Ensure that none of the code assumes we have a DOM
},
// While it is possible to use config-tlmSiblingOfDojo to tell the
// loader that your packages share the same root path as the loader,
// this really isn't always a good idea and it is better to be
// explicit about our package map.
packages: [{
name: "dojo",
location: "dojo"
},{
name: "app",
location: "app"
},{
name: "app-server",
location: "app-server"
}],
deps: [ loadModule ] // And array of modules to load on "boot"
};
// Now load the Dojo loader
require("./src/dojo/dojo.js");