[256] | 1 | var profile = (function(){ |
---|
| 2 | var testResourceRe = /\/tests\//, |
---|
| 3 | |
---|
| 4 | copyOnly = function(filename, mid){ |
---|
| 5 | var list = { |
---|
| 6 | "dojox/dojox.profile":1, |
---|
| 7 | "dojox/package.json":1, |
---|
| 8 | "dojox/mobile/themes/common/compile":1 |
---|
| 9 | }; |
---|
| 10 | return (mid in list) || /^dojox\/resources\//.test(mid) || /(png|jpg|jpeg|gif|tiff)$/.test(filename); |
---|
| 11 | }, |
---|
| 12 | |
---|
| 13 | excludes = [ |
---|
| 14 | "secure", |
---|
| 15 | "cometd", |
---|
| 16 | "data/(demos|ItemExplorer|StoreExplorer|restListener)", |
---|
| 17 | "drawing", |
---|
| 18 | "editor/plugins/(ResizeTableColumn|SpellCheck)", |
---|
| 19 | "embed/(IE)", |
---|
| 20 | "flash", |
---|
| 21 | "gantt", |
---|
| 22 | "help", |
---|
| 23 | "image/(Gallery|SlideShow|ThumbnailPicker)", |
---|
| 24 | "jq", |
---|
| 25 | "jsonPath", |
---|
| 26 | "lang/(aspect|async|docs|observable|oo|typed|functional/(binrec|curry|linrec|listcomp|multirec|numrec|tailrec|util|zip))", |
---|
| 27 | "layout/(BorderContainer|dnd|ext-dijit)", |
---|
| 28 | "mobile/app/", |
---|
| 29 | "rails", |
---|
| 30 | "robot", |
---|
| 31 | "socket/Reconnect", |
---|
| 32 | "storage", |
---|
| 33 | "sql", |
---|
| 34 | "widget/(AnalogGauge|AutoRotator|BarGauge|Calendar|CalendarFx|CalendarViews|DataPresentation|DocTester|DynamicTooltip|FeedPortlet|FilePicker|FisheyeList|gauge|Iterator|Loader|Pager|Portlet|RollingList|Rotator|rotator|SortList|UpgradeBar)", |
---|
| 35 | "wire", |
---|
| 36 | "xmpp" |
---|
| 37 | ], |
---|
| 38 | |
---|
| 39 | excludesRe = new RegExp(("^dojox/(" + excludes.join("|") + ")").replace(/\//, "\\/")), |
---|
| 40 | |
---|
| 41 | usesDojoProvideEtAl = function(mid){ |
---|
| 42 | return excludesRe.test(mid); |
---|
| 43 | }; |
---|
| 44 | |
---|
| 45 | return { |
---|
| 46 | resourceTags:{ |
---|
| 47 | test: function(filename, mid){ |
---|
| 48 | return testResourceRe.test(mid); |
---|
| 49 | }, |
---|
| 50 | |
---|
| 51 | copyOnly: function(filename, mid){ |
---|
| 52 | return copyOnly(filename, mid); |
---|
| 53 | }, |
---|
| 54 | |
---|
| 55 | amd: function(filename, mid){ |
---|
| 56 | return !testResourceRe.test(mid) && !copyOnly(filename, mid) && !usesDojoProvideEtAl(mid) && /\.js$/.test(filename); |
---|
| 57 | }, |
---|
| 58 | |
---|
| 59 | miniExclude: function(filename, mid){ |
---|
| 60 | return 0; |
---|
| 61 | } |
---|
| 62 | }, |
---|
| 63 | |
---|
| 64 | trees:[ |
---|
| 65 | [".", ".", /(\/\.)|(~$)/] |
---|
| 66 | ] |
---|
| 67 | }; |
---|
| 68 | })(); |
---|