mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Specify utf8 encoding.
This commit is contained in:
@@ -9,7 +9,8 @@ var _ = require('lodash'),
|
||||
|
||||
function globTemplate(pattern) {
|
||||
return _.transform(glob.sync(pattern), function(result, filePath) {
|
||||
result[path.basename(filePath, path.extname(filePath))] = _.template(fs.readFileSync(filePath));
|
||||
var key = path.basename(filePath, path.extname(filePath));
|
||||
result[key] = _.template(fs.readFileSync(filePath, 'utf8'));
|
||||
}, {});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user