-
-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add relative symlink support #187
Conversation
function linkFile(file, enc, cb) { | ||
var srcPath = file.path; | ||
var symType = (file.isDirectory() ? 'dir' : 'file'); | ||
prepareWrite(outFolder, file, opt, function(err) { | ||
if (err) { | ||
return cb(err); | ||
} | ||
|
||
if (rel) { | ||
var dstDir = (fs.existsSync(file.path) && symType === 'dir') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably shouldn't use existsSync
here. It is deprecated, a sync method and I think we just assume the files exist with everything else.
@perrin4869 awesome work. I just had a few comments/suggestions |
opt = {}; | ||
} | ||
|
||
var rel = defaultValue(false, boolean(opt.relative)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be inside the linkFile
function and boolean
should be passed file
as the 2nd argument.
pushed some improvements to the implementation! |
This is a very useful feature - love it! Are there any plans to release a new version of |
It will land in 3.0 due to other breaking changes. |
Sounds good. Is there an ETA for 3.0? |
As soon as the outstanding issues are resolved. We all do this in our free time. Feel free to submit a PR if you can. |
Adds support for creating symlinks which point to a file relatively