broccoli-kitchen-sink-helpers
Advanced tools
Comparing version 0.2.2 to 0.2.3
# master | ||
# 0.2.3 | ||
* Speed up `hashStrings` by using `MD5` (instead of `SHA256`). | ||
* Add `symlinkOrCopyPreserveSync` for symlinking with copy fallback on Windows | ||
# 0.2.2 | ||
@@ -4,0 +9,0 @@ |
17
index.js
@@ -7,2 +7,4 @@ var fs = require('fs') | ||
var isWindows = /^win/.test(process.platform) | ||
var pathSep = path.sep | ||
@@ -115,3 +117,3 @@ exports.hashTree = hashTree | ||
var joinedStrings = strings.join('\x00') | ||
return crypto.createHash('sha256').update(joinedStrings).digest('hex') | ||
return crypto.createHash('md5').update(joinedStrings).digest('hex') | ||
} | ||
@@ -229,1 +231,14 @@ | ||
} | ||
exports.symlinkOrCopyPreserveSync = symlinkOrCopyPreserveSync | ||
function symlinkOrCopyPreserveSync (sourcePath, destPath) { | ||
if (isWindows) { | ||
copyRecursivelySync(sourcePath, destPath) | ||
} else { | ||
if (sourcePath[0] != pathSep) { | ||
sourcePath = process.cwd() + pathSep + sourcePath | ||
} | ||
fs.symlinkSync(sourcePath, destPath) | ||
} | ||
} |
{ | ||
"name": "broccoli-kitchen-sink-helpers", | ||
"description": "Collection of helpers that need to be extracted into separate packages", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"author": "Jo Liss <joliss42@gmail.com>", | ||
@@ -10,3 +10,3 @@ "main": "index.js", | ||
"type": "git", | ||
"url": "https://github.com/joliss/broccoli-kitchen-sink-helpers" | ||
"url": "https://github.com/broccolijs/broccoli-kitchen-sink-helpers" | ||
}, | ||
@@ -13,0 +13,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
11373
218