Clarify dependency-changed message

and add a few clarifying comments
This commit is contained in:
Min RK 2015-05-23 14:44:25 -07:00
parent 30102f2780
commit 7923bc817c
2 changed files with 6 additions and 4 deletions

View File

@ -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();
});

View File

@ -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"
}
}