Use node's crypto from fs.md5ForPath()

This commit is contained in:
Kevin Sawicki
2013-03-11 19:20:36 -07:00
parent cc7ddc59ff
commit ec8a5b368b

View File

@@ -146,7 +146,8 @@ module.exports =
traverse(rootPath, '', onFile, onDirectory)
md5ForPath: (path) ->
$native.md5ForPath(path)
contents = nodeFs.readFileSync(path)
nodeRequire('crypto').createHash('md5').update(contents).digest('hex')
resolve: (args...) ->
extensions = args.pop() if _.isArray(_.last(args))