| 1 | var profile = (function(){ |
| 2 | var testResourceRe = /^dijit\/tests\//, |
| 3 | nodeModulesRe = /\/node_modules\//, |
| 4 | |
| 5 | copyOnly = function(filename, mid){ |
| 6 | var list = { |
| 7 | "themes/themes.profile":1, |
| 8 | "themes/package.json":1, |
| 9 | "themes/Gruntfile":1 |
| 10 | }; |
| 11 | return (mid in list) || |
| 12 | (/^dijit\/resources\//.test(mid) && !/\.css$/.test(filename)) || |
| 13 | /(png|jpg|jpeg|gif|tiff)$/.test(filename) |
| 14 | nodeModulesRe.test(mid); |
| 15 | }; |
| 16 | |
| 17 | return { |
| 18 | resourceTags:{ |
| 19 | test: function(filename, mid){ |
| 20 | return testResourceRe.test(mid); |
| 21 | }, |
| 22 | |
| 23 | copyOnly: function(filename, mid){ |
| 24 | return copyOnly(filename, mid); |
| 25 | }, |
| 26 | |
| 27 | amd: function(filename, mid){ |
| 28 | return !testResourceRe.test(mid) && !copyOnly(filename, mid) && /\.js$/.test(filename); |
| 29 | }, |
| 30 | |
| 31 | miniExclude: function(filename, mid){ |
| 32 | return /\.styl$/.test(filename) || |
| 33 | /^dijit\/bench\//.test(mid) || |
| 34 | /^dijit\/themes\/themeTest/.test(mid) || |
| 35 | nodeModulesRe.test(mid); |
| 36 | } |
| 37 | } |
| 38 | }; |
| 39 | })(); |