-
Notifications
You must be signed in to change notification settings - Fork 23
/
demos.profile.js
41 lines (35 loc) · 1.2 KB
/
demos.profile.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
var profile = (function(){
var testResourceRe = /\/tests\//,
copyOnly = function(filename, mid){
var list = {
"demos/demos.profile":1,
"demos/package.json":1,
"demos/README":1
};
return (mid in list) || (/^demos\/resources\//.test(mid) && !/\.css$/.test(filename)) || /(png|jpg|jpeg|gif|tiff)$/.test(filename)
|| /demos\/todoApp\/configuration\//.test(filename)
|| /demos\/todoApp\/details\//.test(filename)
|| /demos\/todoApp\/items\//.test(filename)
|| /demos\/todoApp\/tablet\//.test(filename)
|| /demos\/todoApp\/todoApp.js/.test(filename);
},
usesDojoProvideEtAl = function(mid){
return /^demos\/(babelChat|beer|castle|cropper|css3|demail|doGeo|faces|fisheye|flashCards|fonts|form|i18n|mail|mojo|nihao|skew|survey|uploader|video)\//.test(mid);
};
return {
resourceTags:{
test: function(filename, mid){
return testResourceRe.test(mid);
},
copyOnly: function(filename, mid){
return copyOnly(filename, mid);
},
amd: function(filename, mid){
return !testResourceRe.test(mid) && !copyOnly(filename, mid) && !usesDojoProvideEtAl(mid) && /\.js$/.test(filename);
},
miniExclude: function(filename, mid){
return 0;
}
}
};
})();