Skip to content

Commit 2d2e9df

Browse files
committed
Removing file.expandFileURLs method as it's now obviated by the "nonull" option.
1 parent cfd0e35 commit 2d2e9df

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

lib/grunt/file.js

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -134,35 +134,6 @@ var expandByType = function(type) {
134134
file.expandDirs = expandByType.bind(file, 'isDirectory');
135135
file.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 (/^(?:file|https?):\/\//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-
166137
var pathSeparatorRe = /[\/\\]/g;
167138

168139
// Build a multi task "files" object dynamically.

0 commit comments

Comments
 (0)