This repository was archived by the owner on Oct 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathbootstrap.profile.js
67 lines (57 loc) · 1.75 KB
/
bootstrap.profile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
var profile = (function() {
var testResourceRe = /^bootstrap\/tests\//;
var ignore = function(filename, mid) {
var list = {
"bootstrap/.gitignore": true,
"bootstrap/Gruntfile": true
};
return (mid in list) ||
/^bootstrap\/vendor\//.test(mid);
};
var test = function(filename, mid) {
var list = {
"bootstrap/tests": true
};
return (mid in list) ||
testResourceRe.test(mid);
};
var copyOnly = function(filename, mid) {
var list = {
"bootstrap/bootstrap.profile": true,
"bootstrap/package.json": true,
"bootstrap/LICENSE": true,
"bootstrap/README.md": true
};
return (mid in list) ||
/(png|jpg|jpeg|gif|tiff)$/.test(filename);
};
var miniExclude = function(filename, mid) {
var list = {
"bootstrap/LICENCE": true,
"bootstrap/README.md": true
};
return (mid in list);
};
return {
resourceTags: {
ignore: function(filename, mid) {
return ignore(filename, mid);
},
test: function(filename, mid) {
return test(filename, mid);
},
copyOnly: function(filename, mid) {
return copyOnly(filename, mid);
},
miniExclude: function(filename, mid) {
return miniExclude(filename, mid);
},
amd: function(filename, mid) {
return !test(filename, mid) &&
!copyOnly(filename, mid) &&
!ignore(filename, mid) &&
(/\.js$/).test(filename);
}
}
};
})();