wiledal / gulp-include

Enables functionality similar to that of snockets / sprockets or other file insertion compilation tools.
158 stars 68 forks source link

gulp-changed not picking up new files #56

Closed zslabs closed 8 years ago

zslabs commented 8 years ago

Hi, Thanks so much for creating this! I've run into a snag now that my src file is just one main.js input; gulp-changed doesn't appear to be picking up any changes from the included files; I running this check after I include that main file. Wanted to see if you had any tips around this or if I'm thinking of this incorrectly. Thanks!

wiledal commented 8 years ago

Never used gulp-changed. I usually go with a gulp-watch-setup:

var gulp = require("gulp"),
    watch = require("gulp-watch"),
    include = require("gulp-include");

gulp.task("js", function() {
  gulp.src("assets-src/js/main.js")
    .pipe(include())
    .pipe(gulp.dest("assets/js"));
});

gulp.task("watch", function() {
  watch("assets-src/js/**/*.js", function() {
    gulp.start("js");
  });
})