@@ -98,22 +98,6 @@ module.exports = function(grunt) {
98
98
return libs ;
99
99
} ;
100
100
101
- // An array of paths to third party directories.
102
- var thirdPartyPaths = getThirdPartyPathsFromXML ( ) ;
103
-
104
- /**
105
- * Determine if the file is a Moodle file, or its listed in
106
- * the thirdpartylibs.xml file paths as a third party file.
107
- *
108
- * @param {string } file The file path to determine if thirdparty
109
- * @return {bool } false If thid party file.
110
- */
111
- var isMoodleFile = function ( file ) {
112
- if ( grunt . file . isMatch ( thirdPartyPaths , file ) ) {
113
- return false ;
114
- }
115
- return true ;
116
- } ;
117
101
118
102
// Project configuration.
119
103
grunt . initConfig ( {
@@ -129,15 +113,13 @@ module.exports = function(grunt) {
129
113
// to YUI rollups.
130
114
amd : {
131
115
src : amdSrc ,
132
- filter : isMoodleFile ,
133
116
options : {
134
117
rules : { 'no-undef' : 'error' , 'no-unused-vars' : 'error' , 'no-empty' : 'error' , 'no-unused-expressions' : 'error' }
135
118
}
136
119
} ,
137
120
// Check YUI module source files.
138
121
yui : {
139
122
src : [ '**/yui/src/**/*.js' , '!*/**/yui/src/*/meta/*.js' ] ,
140
- filter : isMoodleFile
141
123
}
142
124
} ,
143
125
uglify : {
@@ -189,6 +171,8 @@ module.exports = function(grunt) {
189
171
* Generate ignore files (utilising thirdpartylibs.xml data)
190
172
*/
191
173
tasks . ignorefiles = function ( ) {
174
+ // An array of paths to third party directories.
175
+ var thirdPartyPaths = getThirdPartyPathsFromXML ( ) ;
192
176
// Generate .eslintignore.
193
177
var eslintIgnores = [ '# Generated by "grunt ignorefiles"' , '*/**/yui/src/*/meta/' , '*/**/build/' ] . concat ( thirdPartyPaths ) ;
194
178
grunt . file . write ( '.eslintignore' , eslintIgnores . join ( '\n' ) ) ;
0 commit comments