diff --git a/gulpfile.js b/gulpfile.js index 585b18412..dd3ad6fec 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -2,7 +2,6 @@ var fork = require('child_process').fork; var fs = require('fs'); var path = require('path'); -var File = require('vinyl'); var through = require('through'); var gulp = require('gulp'); var less = require('gulp-less'); @@ -74,15 +73,19 @@ apps.map(function (name) { } }); + // sources is a greedy list, containing all dependencies plus some for simplicity. gulp.src(sources, {base: s}) .pipe(newer(dest)) .pipe(through(function(file) { - console.log(file.relative + " has changed, updating " + rel_dest); + // if any dependency changed, update main.min.js + console.log("A dependency has changed, updating " + rel_dest); + // pause halts the pipeline this.pause(); build_main(name, finish); return; })) .on('end', function () { + // if we get here, no dependency is newer than the target console.log(rel_dest + " up to date"); finish(); }); diff --git a/package.json b/package.json index 4878fc326..d5cf1ac7e 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,6 @@ "less": "~2", "requirejs": "^2.1.17", "source-map": "^0.4.2", - "through": "^2.3.7", - "vinyl": "^0.4.6" + "through": "^2.3.7" } }