Closed chenaski closed 3 years ago
Interesting! Thanks for the link. I am just wondering, since in the documentation it seems this is not a built-in feature of Gulp, shouldn't you include the package in package.json and import it in the script as well?
Yes, this is not a built-in feature, but sometimes gulp plugins add extra fields to the Vinyl file to pass additional data that the following plugins can use. For example: gulp-data. I think it's one of the reasons why the gulp guidelines [12] recommends using file.clone
.
There is no need to include the gulp-cache package because we just need to store the cachedKey
field this plugin adds to identify the file.
This merge request is part of v0.2.0.
https://github.com/jgable/gulp-cache#one-to-many-caching