diff --git a/index.js b/index.js index a4aa822..8d32381 100644 --- a/index.js +++ b/index.js @@ -4,6 +4,7 @@ var Writer = require('broccoli-writer'); var walkSync = require('walk-sync'); var rimraf = require('rimraf'); var mkdirp = require('mkdirp'); +var symlinkOrCopy = require('symlink-or-copy'); Remover.prototype = Object.create(Writer.prototype); Remover.prototype.constructor = Remover; @@ -36,7 +37,7 @@ Remover.prototype._linkDeeply = function _linkDeeply(source, destination) { linkPath = fs.readlinkSync(linkPath); } - fs.symlinkSync(path.resolve(process.cwd(), linkPath), destination + '/' + relativePath) + symlinkOrCopy.sync(path.resolve(process.cwd(), linkPath), destination + '/' + relativePath) } } }; diff --git a/package.json b/package.json index f9db873..b274435 100644 --- a/package.json +++ b/package.json @@ -18,9 +18,10 @@ ], "dependencies": { "broccoli-writer": "~0.1.1", + "mkdirp": "~0.5.0", "rimraf": "~2.2.8", - "walk-sync": "^0.1.3", - "mkdirp": "~0.5.0" + "symlink-or-copy": "^1.0.0", + "walk-sync": "^0.1.3" }, "devDependencies": { "mocha": "~1.18.2",