]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
trivial refactor in build-customizer grunt task
authorChris Rebert <code@rebertia.com>
Thu, 10 Oct 2013 00:57:52 +0000 (17:57 -0700)
committerChris Rebert <code@rebertia.com>
Thu, 10 Oct 2013 01:03:08 +0000 (18:03 -0700)
Gruntfile.js

index 4242bb7bd1d058eee1b469c75f9999cdf98ba1ef..6d33703c888775074e96cb29e711162336c5564b 100644 (file)
@@ -210,8 +210,8 @@ module.exports = function(grunt) {
           return type == 'fonts' ? true : new RegExp('\\.' + type + '$').test(path)
         })
         .forEach(function (path) {
-          return type == 'fonts' ? files[path] = btoa(fs.readFileSync(type + '/' + path)) :
-              files[path] = fs.readFileSync(type + '/' + path, 'utf8')
+          var fullPath = type + '/' + path
+          return files[path] = (type == 'fonts' ? btoa(fs.readFileSync(fullPath)) : fs.readFileSync(fullPath, 'utf8'))
         })
       return 'var __' + type + ' = ' + JSON.stringify(files) + '\n'
     }