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
  • #2403
Closed
Open
Issue created Dec 19, 2019 by Petr Buchin@petr-buchin

gulp.dest() does not close files when using from watch()

I needed to create new issue since @phated closed my previous issue

What were you expecting to happen? I'm running gulp.watch() locally to recompile static files in public/dist directory. I also watch public/dist directory with Skaffold to propagate changes to containers in my Kubernetes cluster. What actually happened? File changes does not get propagated when files are changed by gulp, but they propagated when I change them by some text redactor. I traced gulp process and looks like gulp does not close files when writes to them. I searched for some option in gulp.dest() but did not find anything.

Also interesting, that tasks, which are triggered from watch(), work good and close files when they are triggered not inside watch().

Please post a sample of your gulpfile (preferably reduced to just the bit that's not working) This task is running from .gulp.watch() task

gulp.task('myapp.js', () => {
  return gulp.src(SRC_PATH + '/myapp.app.js')
    .pipe(plumber())
    .pipe(bro({
      transform: [
        babelify,
        [browserifyCss, { global: true }]
      ]
    }))
    .pipe(rename('myapp.min.js'))
    .pipe(base64())
    .pipe(development(sourcemaps.init({ loadMaps: true })))
    .pipe(production(ngAnnotate()))
    .pipe(production(uglify()))
    .pipe(development(sourcemaps.write('.')))
    .pipe(production(rev()))
    .pipe(assetManifest({
      bundleName: 'myapp-scripts',
      log: development() && !isWatching,
      manifestFile: MANIFEST_FILE,
      pathPrepend: MANIFEST_PREPEND_PATH
    }))
    .pipe(gulp.dest(getTenantAssetsPath('myapp')))
});

What version of gulp are you using? 4.0.2

What versions of npm and node are you using? NPM: 6.11.3 Node: v10.17.0 OS: MacOs Catalina

Assignee
Assign to
Time tracking