build(sample): replace cli-color with smaller and faster ansis

This commit is contained in:
biodiscus
2024-11-17 16:58:36 +01:00
parent 7d62aad5fc
commit 3559e0c1f2
2 changed files with 5 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
import * as childProcess from 'child_process';
import * as clc from 'cli-color';
import { blue, magenta } from 'ansis';
import * as log from 'fancy-log';
import { task } from 'gulp';
import { resolve } from 'path';
@@ -43,7 +43,7 @@ async function executeNPMScriptInDirectory(
appendScript?: string,
) {
const dirName = dir.replace(resolve(__dirname, '../../../'), '');
log.info(`Running ${clc.blue(script)} in ${clc.magenta(dirName)}`);
log.info(`Running ${blue(script)} in ${magenta(dirName)}`);
try {
const result = await exec(
`${script} --prefix ${dir} ${appendScript ? '-- ' + appendScript : ''}`,
@@ -52,7 +52,7 @@ async function executeNPMScriptInDirectory(
// cwd: join(process.cwd(), dir),
// });
log.info(`Finished running ${clc.blue(script)} in ${clc.magenta(dirName)}`);
log.info(`Finished running ${blue(script)} in ${magenta(dirName)}`);
if (result.stderr) {
log.error(result.stderr);
}
@@ -60,7 +60,7 @@ async function executeNPMScriptInDirectory(
log.error(result.stdout);
}
} catch (err) {
log.error(`Failed running ${clc.blue(script)} in ${clc.magenta(dirName)}`);
log.error(`Failed running ${blue(script)} in ${magenta(dirName)}`);
if (err.stderr) {
log.error(err.stderr);
}