forked from oria/gridx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemos.profile.tpl.js
72 lines (71 loc) · 2.09 KB
/
demos.profile.tpl.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
profile = {
stripConsole: "normal"
,layerOptimize: 'closure'
,optimize: 'closure'
,releaseDir: './demos'
,packages: [
{
name: 'dojo'
,location: '../../dojo'
},{
name: 'dijit'
,location: '../../dijit' //always relative to profile path
},{
name: 'dojox'
,location: '../../dojox' //always relative to profile path
},{
name: 'gridx'
,location: '../'
}
]
,layers: {
${layers}
}
,transformJobs:[
[
// the synthetic report module
function(resource) {
return resource.tag.report;
},
["dojoReport", "insertSymbols", "report"]
],[
// synthetic AMD modules (used to create layers on-the-fly
function(resource, bc) {
if (resource.tag.synthetic && resource.tag.amd){
//console.log('write amd: '+ resource.name);
bc.amdResources[resource.mid]= resource;
return true;
}
return false;
},
// just like regular AMD modules, but without a bunch of unneeded transforms
["depsScan", "writeAmd", "writeOptimized"]
],[
// AMD module:
// already marked as an amd resource
// ...or...
// not dojo/dojo.js (filtered above), not package has module (filtered above), not nls bundle (filtered above), not test or building test, not build control script or profile script but still a Javascript resource...
function(resource, bc) {
if (resource.tag.amd || (/\.js$/.test(resource.src) && (!resource.tag.test || bc.copyTests=="build") && !/\.(bcs|profile)\.js$/.test(resource.src))) {
bc.amdResources[resource.mid]= resource;
console.log('*AMD*:' + resource.mid);
return true;
}
return false;
},
["read", "dojoPragmas", "hasFindAll", "insertSymbols", "hasFixup", "depsScan"]
],[
// html file; may need access contents for template interning and/or dojoPragmas; therefore, can't use copy transform
function(resource, bc) {
return /\.(html|htm)$/.test(resource.src);
},
["read", "dojoPragmas"]
],[
// just copy everything else except tests which were copied above iff desired...
function(resource) {
return true;
},
[]
]
]
};