Improve output in case of errors and generate an analysis folder with the source content (for easy diffing)

This commit is contained in:
Alexandru Dima
2019-11-13 11:14:45 +01:00
parent 27770ed1b5
commit b5ce6014d7
7 changed files with 112 additions and 11 deletions

View File

@@ -358,7 +358,7 @@ function markNodes(languageService, options) {
++step;
let node;
if (step % 100 === 0) {
console.log(`${step}/${step + black_queue.length + gray_queue.length} (${black_queue.length}, ${gray_queue.length})`);
console.log(`Treeshaking - ${Math.floor(100 * step / (step + black_queue.length + gray_queue.length))}% - ${step}/${step + black_queue.length + gray_queue.length} (${black_queue.length}, ${gray_queue.length})`);
}
if (black_queue.length === 0) {
for (let i = 0; i < gray_queue.length; i++) {