Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gulp-watch not called on files added #65

Closed
demisx opened this issue Aug 28, 2014 · 2 comments
Closed

gulp-watch not called on files added #65

demisx opened this issue Aug 28, 2014 · 2 comments

Comments

@demisx
Copy link

demisx commented Aug 28, 2014

Hi. I have the watch task file defined as such:

gulp.task('watch-coffee', function () {
  watch({glob: ['./app/**/*.coffee','!./app/**/*-spec.coffee']}, function(files) {
    return files
      .pipe(using())
      .pipe(coffee({ bare: true }).on('error', gutil.log))
      .pipe(gulp.dest('./.build'))
  });
});

Everything works fine when I change an existing coffee file, but nothing happens when I add a new file under app/. Am I missing something?

@demisx
Copy link
Author

demisx commented Aug 28, 2014

Just solved this issue. The problem was in paths starting with leading ./. Removing them made the newly added files to be part of the stream:

gulp.task('watch-coffee', function () {
  watch({glob: ['app/**/*.coffee','!app/**/*-spec.coffee']}, function(files) {
    return files
      .pipe(using())
      .pipe(coffee({ bare: true }).on('error', gutil.log))
      .pipe(gulp.dest('.build'))
  });
});

@demisx demisx closed this as completed Aug 28, 2014
@dashed
Copy link

dashed commented Aug 28, 2014

Probably related to an issue I found: shama/gaze#66

Fixed at: shama/gaze@1c55b3d

@floatdrop Is there a reason gaze v0.5.x is still used? Would updating the dependency to gaze v0.6.x be fine now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants