broccoli-sri-hash
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -111,3 +111,3 @@ var CachingWriter = require('broccoli-caching-writer'); | ||
try { | ||
assetSource = fs.readFileSync(dirname + '/' + file).toString(); | ||
assetSource = fs.readFileSync(dirname + '/' + file, 'utf8'); | ||
} catch(e) { | ||
@@ -205,3 +205,3 @@ return null; | ||
md5sum.update(assetSource); | ||
md5sum.update(assetSource, 'utf8'); | ||
if (md5Matches[2] === md5sum.digest('hex')) { | ||
@@ -229,3 +229,3 @@ return this.generateIntegrity(output, filePath, dirname, true); | ||
var srcDir = path.dirname(entry.fullPath); | ||
var fileContent = this.addSRI(fs.readFileSync(entry.fullPath,'UTF-8'), srcDir); | ||
var fileContent = this.addSRI(fs.readFileSync(entry.fullPath, 'utf8'), srcDir); | ||
var fullPath = this.outputPath + '/' + entry.relativePath; | ||
@@ -232,0 +232,0 @@ |
{ | ||
"name": "broccoli-sri-hash", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Generates SRI hashes for html files", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
202134