Ability to create symlinks with vfs.symlink method
See original GitHub issueThis is a continuation of some discussion in gulp-symlink, see: https://github.com/ben-eb/gulp-symlink/issues/19, https://github.com/ben-eb/gulp-symlink/issues/23#issuecomment-62816263
As previously stated, the current way we are handling symlinks using a transform stream, as we would use for manipulating a file’s contents, isn’t ideal. As symlinks are part of the file system it would make sense to provide this support in vinyl-fs
, and by extension, gulp
.
Ideally, this allows us to:
- Create symlinks with absolute or relative paths, depending on the user’s preference.
- Utilise transforms already in the pipe, such as gulp-rename to both rename and create the new symlink.
I think an API such as this would be good:
gulp.task('symlink', function() {
return gulp.src('path/to/file')
.pipe(gulp.dest('dist', {
symlink: 'relative' // or 'absolute'
}));
});
Issue Analytics
- State:
- Created 9 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
VFS3 and symlinks| JBoss.org Content Archive (Read Only)
What I question is why we need to force it. As long as all accesses to the file via URL use the same...
Read more >How to Create Symbolic Links: A Comprehensive Guide
Create a symbolic link using the below syntax. This command creates the symlink in the current directory. ... Change symlink_name to your desired ......
Read more >Implementing symlinks in a virtual file system - Stack Overflow
I'm working on a virtual file system which isn't disk based, kind of like /proc. Now I want to create a symlink within...
Read more >What are Symbolic Links? Hard & Soft Symbolic ... - Komprise
Symbolic Links are file-system objects that point toward another file or folder. Learn more about how hard & soft symbolic links are used...
Read more >Access windows symbolic link from linux cifs
Could you please clarify your question just a bit more, you said a windows symlink is what you are trying to mount? Was...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
seems like with the current solution you cannot control where the symlink leads to “
cwd
,base
, andpath
will be overwritten to match the folder”The structure I have depends on the source file having a complete different folder structure than where the symlink should be placed inside. When I simply replaced gulp.dest() with vfs.symlink() it creates the symlink in the correct place but it leads to a non existing place.
I used gulp-rename to change the path but didn’t help.
Awesome. 👍