|
@@ -241,7 +241,7 @@ const processFile = async file => {
|
|
|
}); // update database with status
|
|
}); // update database with status
|
|
|
return false;
|
|
return false;
|
|
|
} else {
|
|
} else {
|
|
|
- processOutput('\n'); // send a new line
|
|
|
|
|
|
|
+ process.stdout.write('\n'); // send a new line
|
|
|
}
|
|
}
|
|
|
// update database with output name
|
|
// update database with output name
|
|
|
setFile(db, file, {
|
|
setFile(db, file, {
|
|
@@ -353,10 +353,11 @@ const main = async () => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
const watcher = chokidar.watch(watches, opts); // init our watcher
|
|
const watcher = chokidar.watch(watches, opts); // init our watcher
|
|
|
- console.log('Watching:', watches, '\n');
|
|
|
|
|
|
|
+ console.log('Watching:', watches);
|
|
|
watcher
|
|
watcher
|
|
|
.on('add', async file => {
|
|
.on('add', async file => {
|
|
|
- // when a new file is added ...
|
|
|
|
|
|
|
+ // when a file is added ...
|
|
|
|
|
+ console.log(` -> ${file} has been added`);
|
|
|
queue.push(file); // push the file onto the queue to be processed
|
|
queue.push(file); // push the file onto the queue to be processed
|
|
|
})
|
|
})
|
|
|
.on('change', file => {
|
|
.on('change', file => {
|
|
@@ -369,7 +370,6 @@ const main = async () => {
|
|
|
cleanup(file);
|
|
cleanup(file);
|
|
|
})
|
|
})
|
|
|
.on('error', error => {
|
|
.on('error', error => {
|
|
|
- // on errors ..
|
|
|
|
|
console.error(` -> Error: ${error.message || error}`);
|
|
console.error(` -> Error: ${error.message || error}`);
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|