@@ -134,35 +134,6 @@ var expandByType = function(type) {
134134file . expandDirs = expandByType . bind ( file , 'isDirectory' ) ;
135135file . expandFiles = expandByType . bind ( file , 'isFile' ) ;
136136
137- // Return an array of all file paths that match the given wildcard patterns,
138- // plus a uniqed list of any URLs that were passed, at the end.
139- file . expandFileURLs = function ( ) {
140- // Use the first argument if it's an Array, otherwise convert the arguments
141- // object to an array and use that.
142- var patterns = Array . isArray ( arguments [ 0 ] ) ? arguments [ 0 ] : grunt . util . toArray ( arguments ) ;
143- var urls = [ ] ;
144- // Filter all URLs out of patterns list and store them in a separate array.
145- patterns = grunt . util . _ . flatten ( patterns ) . filter ( function ( pattern ) {
146- if ( / ^ (?: f i l e | h t t p s ? ) : \/ \/ / i. test ( pattern ) ) {
147- // Push onto urls array.
148- urls . push ( pattern ) ;
149- // Remove from patterns array.
150- return false ;
151- }
152- // Otherwise, keep pattern.
153- return true ;
154- } ) ;
155- // Return uniqed array of expanded filepaths with urls at end.
156- return grunt . util . _ . uniq ( file . expandFiles ( patterns ) . map ( function ( filepath ) {
157- var abspath = path . resolve ( filepath ) ;
158- // Convert C:\foo\bar style paths to /C:/foo/bar.
159- if ( abspath . indexOf ( '/' ) !== 0 ) {
160- abspath = unixifyPath ( '/' + abspath ) ;
161- }
162- return 'file://' + abspath ;
163- } ) . concat ( urls ) ) ;
164- } ;
165-
166137var pathSeparatorRe = / [ \/ \\ ] / g;
167138
168139// Build a multi task "files" object dynamically.
0 commit comments