mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-13 20:37:48 +00:00
Specify utf8 encoding.
This commit is contained in:
@@ -9,7 +9,8 @@ var _ = require('lodash'),
|
|||||||
|
|
||||||
function globTemplate(pattern) {
|
function globTemplate(pattern) {
|
||||||
return _.transform(glob.sync(pattern), function(result, filePath) {
|
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