Skip to content

Commit c87110f

Browse files
committed
Remove dependency on broccoli-asset-rev
1 parent 3ebb0e6 commit c87110f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

lib/key-generators/file-hash.js

+8-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ var CoreObject = require('core-object');
22
var fs = require('fs');
33
var path = require('path');
44
var minimatch = require('minimatch');
5-
var Fingerprint = require('broccoli-asset-rev/lib/fingerprint');
5+
var crypto = require('crypto');
66
var Promise = require('ember-cli/lib/ext/promise');
77

88
var denodeify = require('rsvp').denodeify;
@@ -29,8 +29,7 @@ module.exports = CoreObject.extend({
2929

3030
return readFile(filePath)
3131
.then(function(contents) {
32-
fingerprint = new Fingerprint();
33-
return fingerprint.hashFn(contents.toString());
32+
return md5Hash(contents.toString());
3433
})
3534
},
3635

@@ -42,3 +41,9 @@ module.exports = CoreObject.extend({
4241
return config[key];
4342
}
4443
});
44+
45+
function md5Hash(buf) {
46+
var md5 = crypto.createHash('md5');
47+
md5.update(buf);
48+
return md5.digest('hex');
49+
}

0 commit comments

Comments
 (0)