trivial refactor in build-customizer grunt task

This commit is contained in:
Chris Rebert 2013-10-09 17:57:52 -07:00
parent aad70834fc
commit f9ed8e6f00
1 changed files with 2 additions and 2 deletions

View File

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