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
  • #925
Closed
Open
Issue created Feb 24, 2015 by Administrator@rootContributor

Document updated gulp.watch syntax for gulp 4.0

Created by: kincaidoneil

I recently updated to the 4.0 branch, however, I'm experiencing an issue in which using a function as a callback to gulp.watch results in nothing being based through to the event variable, as I particularly use event.path.

Here's my code:

gulp.watch('app/index.html', function(event) {
    console.log(event);
    console.log(event.path);
});

Here's what the console returns after the file is updated:

[Function: done]
undefined

Even if I pass through gulp.series('name_of_task_here'), it passes through the same thing to the first parameter.

Is there anything I'm doing wrong/was this method deprecated in gulp 4.0? If so, is there a better alternative?

Thanks!

Assignee
Assign to
Time tracking