2012-08-14 16:59:10 +02:00
|
|
|
var profile = (function(){
|
|
|
|
var testResourceRe = /^dijit\/tests\//,
|
2017-01-20 18:29:59 +01:00
|
|
|
nodeModulesRe = /\/node_modules\//,
|
2012-08-14 16:59:10 +02:00
|
|
|
|
|
|
|
copyOnly = function(filename, mid){
|
|
|
|
var list = {
|
|
|
|
"dijit/dijit.profile":1,
|
|
|
|
"dijit/package.json":1,
|
|
|
|
"dijit/themes/claro/compile":1
|
|
|
|
};
|
2017-01-20 18:29:59 +01:00
|
|
|
return (mid in list) ||
|
|
|
|
(/^dijit\/resources\//.test(mid) && !/\.css$/.test(filename)) ||
|
|
|
|
/(png|jpg|jpeg|gif|tiff)$/.test(filename) ||
|
|
|
|
nodeModulesRe.test(mid);
|
2012-08-14 16:59:10 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
return {
|
|
|
|
resourceTags:{
|
|
|
|
test: function(filename, mid){
|
|
|
|
return testResourceRe.test(mid) || mid=="dijit/robot" || mid=="dijit/robotx";
|
|
|
|
},
|
|
|
|
|
|
|
|
copyOnly: function(filename, mid){
|
|
|
|
return copyOnly(filename, mid);
|
|
|
|
},
|
|
|
|
|
|
|
|
amd: function(filename, mid){
|
|
|
|
return !testResourceRe.test(mid) && !copyOnly(filename, mid) && /\.js$/.test(filename);
|
|
|
|
},
|
|
|
|
|
|
|
|
miniExclude: function(filename, mid){
|
2017-01-20 18:29:59 +01:00
|
|
|
return /^dijit\/bench\//.test(mid) ||
|
|
|
|
/^dijit\/themes\/themeTest/.test(mid) ||
|
|
|
|
nodeModulesRe.test(mid);
|
2012-08-14 16:59:10 +02:00
|
|
|
}
|
2013-03-18 07:26:24 +01:00
|
|
|
}
|
2012-08-14 16:59:10 +02:00
|
|
|
};
|
|
|
|
})();
|