-
Notifications
You must be signed in to change notification settings - Fork 4
/
agrc.profile.js
41 lines (40 loc) · 1.29 KB
/
agrc.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
/*eslint-disable no-unused-vars, no-undef */
var profile = (function () {
var testResourceRe = /.*\/tests\//;
var copyOnly = function (filename, mid) {
var list = {
'agrc/agrc.profile': true,
'agrc/package.json': true
};
return (mid in list) ||
(/^resources\//.test(mid) && !/\.css$/.test(filename)) ||
/(png|jpg|jpeg|gif|tiff)$/.test(filename);
// Check if it is one of the special files, if it is in
// resource (but not CSS) or is an image
};
var ignores = {
'agrc/Gruntfile': true
};
var nonAMDs = {
// for some reason this breaks the build if it's
// tagged as AMD
'spin': true
};
return {
resourceTags: {
test: function (filename, mid) {
return testResourceRe.test(mid);
},
copyOnly: function (filename, mid) {
return copyOnly(filename, mid);
},
amd: function (filename, mid) {
return (/\.js$/).test(filename) && !(mid in nonAMDs);
},
ignore: function (filename, mid) {
return mid in ignores || /.*\/node_modules\//.test(mid);
}
}
};
}());
/*eslint-enable no-unused-vars, no-undef */