gulp-sym
Gulp symlink module
Deprecation warning
In favor of https://github.com/ben-eb/gulp-symlink See https://github.com/ben-eb/gulp-symlink/issues/15
Installation
npm install gulp-sym --save-dev {--production}
Usage
Simple example
var symlink = gulp //note that it'll return source streams not the symlink ones
Advanced example
var symlink = p = File = File gulp //source is a vinyl instance //use force option to replace existant
Options
force
(bool): force overwrite symlinkrelative
(bool): your link will be relative
/!\ Don't do this ...
If you're working on more than 1 source, use a function or an array to specify the destination path so gulp-sym
doesn't override the previous symlink!
Here is a counterexample, dest
will be a link to source/path/two
and the first one will not have any symlink!
gulp //bad shit WILL happen
... but this
That's how it should be:
gulp
or through a function that'll be called on each source
gulp
It's intendend behavior and api will not change for this, I could warn the user in this case - to be discussed.
Why?
I'm aware that there is another symlink module for gulp but as of v0.1.0 it didn't fit my needs and seems to get messy (absolute/relative). In this plugin, paths
are always absolute and resolves from the cwd
that you might change by passing a vinyl instance to the destination function.
- has no force option to replace existing link
- uses fs.symlink twice instead of using
fs.exists
. I'm aware of the nodejs docs specifying thatfs.exists
is there on an historical purpose only but why shouldn't we use it? - doesn't use the specified type option mentioned in the nodejs docs (windows only)
- has no test on symlinking directories (maybe why tests are good to go on windows)
- has bad support on multiple sources (at the moment)
Licence
MIT