2012-08-14 16:59:10 +02:00
|
|
|
var profile = (function(){
|
2017-01-20 18:29:59 +01:00
|
|
|
var testResourceRe = /^dojo\/tests(?:DOH)?\//,
|
|
|
|
nodeModulesRe = /\/node_modules\//,
|
2012-08-14 16:59:10 +02:00
|
|
|
|
|
|
|
copyOnly = function(filename, mid){
|
|
|
|
var list = {
|
|
|
|
"dojo/dojo.profile":1,
|
|
|
|
"dojo/package.json":1,
|
|
|
|
"dojo/OpenAjax":1,
|
|
|
|
"dojo/tests":1,
|
|
|
|
// these are test modules that are not intended to ever be built
|
|
|
|
"dojo/tests/_base/loader/requirejs/requirejs-setup":1,
|
|
|
|
"dojo/tests/_base/loader/requirejs/dataMain":1,
|
|
|
|
"dojo/tests/_base/loader/requirejs/depoverlap":1,
|
|
|
|
"dojo/tests/_base/loader/requirejs/simple-tests":1,
|
|
|
|
"dojo/tests/_base/loader/requirejs/relative/relative-tests":1,
|
|
|
|
"dojo/tests/_base/loader/requirejs/exports/exports-tests":1
|
|
|
|
};
|
2013-03-18 07:26:24 +01:00
|
|
|
return (mid in list) ||
|
|
|
|
/^dojo\/_base\/config\w+$/.test(mid) ||
|
|
|
|
(/^dojo\/resources\//.test(mid) && !/\.css$/.test(filename)) ||
|
|
|
|
/(png|jpg|jpeg|gif|tiff)$/.test(filename) ||
|
2017-01-20 18:29:59 +01:00
|
|
|
nodeModulesRe.test(mid) ||
|
2013-03-18 07:26:24 +01:00
|
|
|
/built\-i18n\-test\/152\-build/.test(mid);
|
2012-08-14 16:59:10 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
return {
|
|
|
|
resourceTags:{
|
|
|
|
test: function(filename, mid){
|
2017-01-20 18:29:59 +01:00
|
|
|
return testResourceRe.test(mid) || mid=="dojo/robot" || mid=="dojo/robotx";
|
2012-08-14 16:59:10 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
copyOnly: function(filename, mid){
|
|
|
|
return copyOnly(filename, mid);
|
|
|
|
},
|
|
|
|
|
|
|
|
amd: function(filename, mid){
|
|
|
|
return !testResourceRe.test(mid) && !copyOnly(filename, mid) && /\.js$/.test(filename);
|
2017-01-20 18:29:59 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
miniExclude: function(filename, mid){
|
|
|
|
return 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
|
|
|
};
|
|
|
|
})();
|