Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • G gulp
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 24
    • Issues 24
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gulp
  • gulp
  • Issues
  • #1282
Closed
Open
Issue created Sep 26, 2015 by Administrator@rootContributor

Gulp 4: Watch task is executed per each matched file during startup

Created by: demisx

My versions:

gulp -v
[21:59:43] CLI version 0.4.0
[21:59:43] Local version 4.0.0-alpha.1

I have a watch task to run unit tests defined like this:

gulp.task('unit', function () {
  // piping files to gulp-mocha here
  ...
});

gulp.task('watch:unit', function () {
  gulp.watch(['app/**/*.js', '!app/**/*.spec.js'], gulp.parallel('unit'));
});

The strange behavior I'm seeing now is that when I run the gulp watch:unit task first time it tries to run the unit task for each matched *.js file (see the output below). I don't recall having this issue before.

$ gulp watch:unit
[22:02:20] Using gulpfile ~/projects/web-services/data-api/gulpfile.js
[22:02:20] Starting 'watch:unit'...
[22:02:20] Starting 'parallel'...
[22:02:20] Starting 'parallel'...
[22:02:20] Starting 'parallel'...
[22:02:20] Starting 'unit'...
[22:02:20] Starting 'unit'...
[22:02:20] Starting 'unit'...

  0 passing (1ms)
  ․
  ․․․[22:02:20] Starting 'parallel'...
[22:02:20] Starting 'unit'...
[22:02:20] Starting 'parallel'...
[22:02:20] Starting 'parallel'...
[22:02:20] Starting 'parallel'...
[22:02:20] Starting 'unit'...
[22:02:20] Starting 'unit'...
[22:02:20] Starting 'unit'...
[22:02:20] Starting 'parallel'...
[22:02:20] Starting 'parallel'...
[22:02:20] Starting 'unit'...
[22:02:20] Starting 'unit'...
[22:02:20] Starting 'parallel'...
[22:02:20] Starting 'parallel'...
[22:02:20] Starting 'parallel'...
[22:02:20] Starting 'parallel'...
[22:02:20] Starting 'unit'...
[22:02:20] Starting 'unit'...
[22:02:20] Starting 'unit'...
[22:02:20] Starting 'unit'...
[22:02:20] Starting 'parallel'...
[22:02:20] Starting 'parallel'...
[22:02:20] Starting 'unit'...
[22:02:20] Starting 'unit'...
[22:02:20] Starting 'parallel'...
[22:02:20] Starting 'parallel'...
[22:02:20] Starting 'unit'...
[22:02:20] Starting 'unit'...
[22:02:20] Starting 'parallel'...
[22:02:20] Starting 'parallel'...
[22:02:20] Starting 'unit'...
[22:02:20] Starting 'unit'...
[22:02:20] Starting 'parallel'...
[22:02:20] Starting 'parallel'...
[22:02:20] Starting 'parallel'...
[22:02:20] Starting 'unit'...
[22:02:20] Starting 'unit'...
[22:02:20] Starting 'unit'...
  0 passing (0ms)
  0 passing (0ms)
  0 passing (0ms)
  0 passing (0ms)
  0 passing (0ms)
  0 passing (0ms)
  0 passing (0ms)
  0 passing (0ms)
  0 passing (0ms)
  0 passing (0ms)
  0 passing (0ms)
  0 passing (0ms)
  0 passing (0ms)
  0 passing (0ms)
  0 passing (0ms)
  0 passing (0ms)
  0 passing (0ms)
  0 passing (0ms)
  0 passing (0ms)
․․․․․․․․․․
  7 passing (156ms)
  7 passing (125ms)
Assignee
Assign to
Time tracking