source: Dev/trunk/src/client/util/build/transforms/hasFindAll.js

Last change on this file was 483, checked in by hendrikvanantwerpen, 11 years ago

Added Dojo 1.9.3 release.

File size: 478 bytes
Line 
1define(["../buildControl"], function(bc) {
2        return function(resource){
3                if(resource.hasTest){
4                        return 0;
5                }
6                var
7                        hasFeatures = bc.hasFeatures = bc.hasFeatures || {},
8                        text = resource.text,
9                        hasRe = /[^\w\.]has\s*\(\s*["']([^"']+)["']\s*\)/g,
10                        result;
11                while((result = hasRe.exec(text)) != null){
12                        var
13                                featureName = result[1],
14                                sourceSet = hasFeatures[featureName] = hasFeatures[featureName] || {};
15                        sourceSet[resource.mid] = 1;
16                }
17                return 0;
18        };
19});
Note: See TracBrowser for help on using the repository browser.