]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
grunt/change-version.js: Remove extra parens around function literals because Hound
authorChris Rebert <github@chrisrebert.com>
Thu, 17 Dec 2015 05:26:29 +0000 (21:26 -0800)
committerChris Rebert <github@chrisrebert.com>
Thu, 17 Dec 2015 05:26:29 +0000 (21:26 -0800)
[ci skip]

grunt/change-version.js

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