Closed kettanaito closed 7 years ago
Which tasks do you mean exactly? In JS task it is solved by browserify/watchify.
@janpanschab I am talking about some changes checker, which passes only those files which changed to the appropriate tasks. Maybe Gulp runs this automatically, but I remember this being somewhat an issue in Grunt.
Basically, something like this (https://github.com/sindresorhus/gulp-changed) may allow to process only changed files through tasks. For example, if you have been working on some index.tpl
file, and hit "Save", with this sort or plugins only this index.tpl
will run through templating engine, and all the other templates will not. This may potentially save time, I presume.
@kettanaito I think it is not possible to use it for templates because imagine when you change some partial template - what should be done? You need to change all pages where this partial is used. AFAIK this approach is useable only on some types of tasks (e.g. linting).
@janpanschab a good point. And what do you think about other instances?
It make sense in eslint task, icon (svgmin only) task and stylelint task.
Already implemented in stylelint and eslint.
How about filtering the files and passing only those changed into various tasks? Should be pretty resource- and time-efficient.
There are usually plugins for that. Here is the one I've found right away: https://www.npmjs.com/package/gulp-changed.