]>
Commit | Line | Data |
---|---|---|
1354d172 | 1 | var profile = (function(){ |
6887a0f5 AK |
2 | var testResourceRe = /^dojo\/tests(?:DOH)?\//, |
3 | nodeModulesRe = /\/node_modules\//, | |
1354d172 AD |
4 | |
5 | copyOnly = function(filename, mid){ | |
6 | var list = { | |
7 | "dojo/dojo.profile":1, | |
8 | "dojo/package.json":1, | |
9 | "dojo/OpenAjax":1, | |
10 | "dojo/tests":1, | |
11 | // these are test modules that are not intended to ever be built | |
12 | "dojo/tests/_base/loader/requirejs/requirejs-setup":1, | |
13 | "dojo/tests/_base/loader/requirejs/dataMain":1, | |
14 | "dojo/tests/_base/loader/requirejs/depoverlap":1, | |
15 | "dojo/tests/_base/loader/requirejs/simple-tests":1, | |
16 | "dojo/tests/_base/loader/requirejs/relative/relative-tests":1, | |
17 | "dojo/tests/_base/loader/requirejs/exports/exports-tests":1 | |
18 | }; | |
f0cfe83e AD |
19 | return (mid in list) || |
20 | /^dojo\/_base\/config\w+$/.test(mid) || | |
21 | (/^dojo\/resources\//.test(mid) && !/\.css$/.test(filename)) || | |
22 | /(png|jpg|jpeg|gif|tiff)$/.test(filename) || | |
6887a0f5 | 23 | nodeModulesRe.test(mid) || |
f0cfe83e | 24 | /built\-i18n\-test\/152\-build/.test(mid); |
1354d172 AD |
25 | }; |
26 | ||
27 | return { | |
28 | resourceTags:{ | |
29 | test: function(filename, mid){ | |
6887a0f5 | 30 | return testResourceRe.test(mid) || mid=="dojo/robot" || mid=="dojo/robotx"; |
1354d172 AD |
31 | }, |
32 | ||
33 | copyOnly: function(filename, mid){ | |
34 | return copyOnly(filename, mid); | |
35 | }, | |
36 | ||
37 | amd: function(filename, mid){ | |
38 | return !testResourceRe.test(mid) && !copyOnly(filename, mid) && /\.js$/.test(filename); | |
6887a0f5 AK |
39 | }, |
40 | ||
41 | miniExclude: function(filename, mid){ | |
42 | return nodeModulesRe.test(mid); | |
1354d172 | 43 | } |
f0cfe83e | 44 | } |
1354d172 AD |
45 | }; |
46 | })(); |