gulp icon indicating copy to clipboard operation
gulp copied to clipboard

Watchers do not detect specific files

Open mvicens opened this issue 3 years ago • 0 comments

Taking this simple sample:

const { watch } = require('gulp');

function css(cb) {
	cb();
}

function js(cb) {
	cb();
}

exports.default = function () {
	watch('src/**/*.css', css);
	watch('src/scripts/index.js', js);
};

If you create any CSS file, it is detected correctly and a "Starting 'css'..." (and the appropriate finalization) appears in the console.

However, if you put the specific JS file, at the same time with its folder, nothing happens and no more during the stream lifecycle.

Why this behaviour? Is it a bug, right?

mvicens avatar Nov 26 '22 20:11 mvicens