0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-29 21:52:22 +01:00

grunt/change-version.js: Remove extra parens around function literals because Hound

[ci skip]
This commit is contained in:
Chris Rebert 2015-12-16 21:26:29 -08:00
parent 0cd0e66632
commit 701513969d

View File

@ -55,18 +55,18 @@ function walkAsync(directory, excludedDirectories, fileCallback, errback) {
function replaceRecursively(directory, excludedDirectories, allowedExtensions, original, replacement) { function replaceRecursively(directory, excludedDirectories, allowedExtensions, original, replacement) {
original = new RegExp(RegExp.quote(original), 'g'); original = new RegExp(RegExp.quote(original), 'g');
replacement = RegExp.quoteReplacement(replacement); replacement = RegExp.quoteReplacement(replacement);
var updateFile = !DRY_RUN ? (function (filepath) { var updateFile = !DRY_RUN ? function (filepath) {
if (allowedExtensions.has(path.parse(filepath).ext)) { if (allowedExtensions.has(path.parse(filepath).ext)) {
sed('-i', original, replacement, filepath); sed('-i', original, replacement, filepath);
} }
}) : (function (filepath) { } : function (filepath) {
if (allowedExtensions.has(path.parse(filepath).ext)) { if (allowedExtensions.has(path.parse(filepath).ext)) {
console.log('FILE: ' + filepath); console.log('FILE: ' + filepath);
} }
else { else {
console.log('EXCLUDED:' + filepath); console.log('EXCLUDED:' + filepath);
} }
}); };
walkAsync(directory, excludedDirectories, updateFile, function (err) { walkAsync(directory, excludedDirectories, updateFile, function (err) {
console.error('ERROR while traversing directory!:'); console.error('ERROR while traversing directory!:');
console.error(err); console.error(err);