Skip to content

Watch omits files #261

@cranesandcaff

Description

@cranesandcaff

When using gulp.watch it will for some reason completely omit a file when saved.

gulp.task('script', function(){
return gulp.src(['js/**/*.js'])
    .pipe(concat('appmain.js'))
    .pipe(gulp.dest('build/js'))
    .pipe(rename({suffix: '.min'}))
    .pipe(ngmin())
    .pipe(uglify({mangle: false}))
    .pipe(gulp.dest('build/js'))
   });
  gulp.task('watch', function(){
  gulp.watch('scss/**/*.scss', ['styles']);

  gulp.watch('js/**/*.js', ['script']);


})

When using gulp watch sometimes it will stop adding a file, for instance if I am working on 'functionOne.js" it will continue updating and minifying, then it will stop and when checking the concated appmain.js the code from 'functionOne.js' doesn't appear.

However if I then run 'gulp script' it will appear. If I then start watching again it will still not include that file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions