vinyl-paths2.1.0 • Public • Published
Get the file paths in a vinyl stream
Useful when you need to use the file paths from a gulp pipeline in Promise-returning node module.
Simply pass a promise-returning function such as
vinyl-paths will provide each path in the stream as the first argument.
$ npm install --save vinyl-paths
// gulpfile.jsvar gulp = ;var stripDebug = ;var del = ;var vinylPaths = ;// log file paths in the streamgulp;// delete files in the streamgulp;// or if you need to use the paths after the pipelinegulp;
You should only use a vanilla node module like this if you're already using other plugins in the pipeline, otherwise just use the module directly as
gulp.src is costly. Remember that gulp tasks can return Promises as well as streams!
The optionally supplied callback will get a file path for every file and is expected to return a Promise. An array of the file paths so far is available as a
paths property on the stream.
- gulp-revert-path - Revert the previous
MIT © Sindre Sorhus