add build size stats

This commit is contained in:
Rene
2021-02-16 00:30:21 +01:00
parent af99cfa97c
commit a3699202b3
5 changed files with 1421 additions and 21 deletions
+2 -1
View File
@@ -2,6 +2,7 @@ const fs = require('fs');
const crypto = require('crypto');
const path = require('path');
const del = require('del');
const chalk = require('chalk');
const readline = require('readline');
const rollup = require('rollup');
const rollupPluginHtml = require('@rollup/plugin-html');
@@ -168,7 +169,7 @@ const setupRollupTest = async (rootDir, testPath, cacheDir, watch) => {
const getHtmlFileContent = () => (fs.existsSync(htmlFilePath) ? fs.readFileSync(htmlFilePath, 'utf8') : null);
const logBuilding = (re) => {
const text = re ? ' RE-BUILDING ' : ' BUILDING ';
console.log(`\x1b[1m\x1b[44m${text}\x1b[0m \x1b[90m${testPath}\x1b[0m`); // eslint-disable-line
console.log(`${chalk.bgBlue.bold.whiteBright(text)} ${chalk.blackBright(testPath)}`); // eslint-disable-line
};
const logBundleFinish = (duration) => {
if (duration) {