forked from dojo/dojo1-dmodel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.js
35 lines (31 loc) · 914 Bytes
/
package.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
var miniExcludes = {
'dmodel/README.md': 1,
'dmodel/package': 1
},
isTestRe = /\/test\//;
var packages = {};
try {
// retrieve the set of packages for determining which modules to include
require(['util/build/buildControl'], function (buildControl) {
packages = buildControl.packages;
});
} catch (error) {
console.error('Unable to retrieve packages for determining optional package support in dmodel');
}
var profile = {
resourceTags: {
test: function (filename, mid) {
return isTestRe.test(filename);
},
miniExclude: function (filename, mid) {
return /\/(?:tests|demos|docs)\//.test(filename) || mid in miniExcludes;
},
amd: function (filename, mid) {
return /\.js$/.test(filename);
},
copyOnly: function (filename, mid) {
// conditionally omit modules dependent on json-schema packages
return (!packages['json-schema'] && /jsonSchema\.js/.test(filename));
}
}
};