-
Notifications
You must be signed in to change notification settings - Fork 12
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
Cache parsed html/xml #7
Comments
Care to elaborate with an example? I'm not quite sure I understand. |
@KenPowers sure, lets say I would like to use gulp-cheerio to modify svg before it is passed to gulp-svgstore, I would write it something like this: gulp.src(config.SRC_SVG_LIST)
.pipe(cheerio({
run: function ($) {
$('svg').attr('fill', '#666666');
}
}))
.pipe(svgstore()) This means that every file will go through cheerio parser when it is transformed by gulp-cheerio, and then it will have to be parsed with cheerio again in gulp-svgstore. My idea is to cache |
Same goes in the other direction, lets say I would like to transform the result of gulp-svgstore with gulp-cheerio, e.g. gulp.src(config.SRC_SVG_LIST)
.pipe(svgstore())
.pipe(cheerio({
run: function ($) {
$('svg').attr('style', 'display:none');
}
})) I can also cache |
I like the idea but I think claiming |
Sure, |
Published version |
@KenPowers good, I just published |
It would be great if gulp-cheerio cached parsed html/xml in gulp file objects so it could be reused in other gulp plugins e.g. in my gulp-svgstore.
The text was updated successfully, but these errors were encountered: