Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/lib/buildlist.js b/lib/buildlist.js
- index 2aaf39c..1d9fea4 100644
- --- a/lib/buildlist.js
- +++ b/lib/buildlist.js
- @@ -40,4 +40,19 @@ Buildlist.prototype.reload = function() {
- return delta;
- };
- +Buildlist.prototype.filterNonExisting = function() {
- + var deleting = [];
- + this.list.forEach(function (ident, i) {
- + var mypath = path.join(this.baseUrl, ident + '.js');
- + if (!fs.existsSync(mypath)) {
- + deleting.push(i);
- + }
- + });
- + deleting.reverse();
- + deleting.forEach(function (i) {
- + this.list.splice(i, 1);
- + });
- + return this.list;
- +};
- +
- module.exports = Buildlist;
- diff --git a/watcher.js b/watcher.js
- index bac35dd..c0bacf3 100644
- --- a/watcher.js
- +++ b/watcher.js
- @@ -212,6 +212,9 @@ var buildlist = new Buildlist({
- baseUrl: baseUrl
- });
- +console.log(buildlist.filterNonExisting().length);
- +process.exit(0);
- +
- var buildQueue = new BuildQueue({
- log: log,
- fs: fileSystem,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement