Skip to content

Watchers do not detect specific files #84

Description

@mvicens

Taking this Gulp file:

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

function css(cb) {
	cb();
}

function js(cb) {
	cb();
}

function defaultTask(cb) {
	watch('src/**/*.css', css);
	watch('src/scripts/index.js', js);
	cb();
}

exports.default = defaultTask;

And, starting from an empty folder src, ...

  1. Run Gulp command.
  2. Create a CSS file. ✅ It is detected correctly (a "Starting 'css'..." and the appropriate finalization appear in the console).
  3. Change the content of this file. ✅ Detected.
  4. So, put the specific JS file. ❌ Nothing happens.
  5. Change its content. ❌ Nothing.
  6. Rerun command (finish and start again).
  7. Change the CSS content. ✅ Detected.
  8. Change the JS content. ✅ Detected.

Why this behaviour (steps 4 & 5)? Is it a bug, right?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions