Skip to content

Commit

Permalink
Merge pull request #14155 from webdiscus/cli-color-to-ansis
Browse files Browse the repository at this point in the history
build(sample): replace cli-color with smaller and faster ansis
  • Loading branch information
kamilmysliwiec authored Nov 18, 2024
2 parents 7d62aad + 3559e0c commit 27193cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@
},
"dependencies": {
"@nuxtjs/opencollective": "0.3.2",
"ansis": "3.3.2",
"class-transformer": "0.5.1",
"class-validator": "0.14.1",
"cli-color": "2.0.4",
"cors": "2.8.5",
"express": "4.21.1",
"fast-json-stringify": "6.0.0",
Expand Down
8 changes: 4 additions & 4 deletions tools/gulp/tasks/samples.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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 : ''}`,
Expand All @@ -52,15 +52,15 @@ 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);
}
if (result.stdout) {
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);
}
Expand Down

0 comments on commit 27193cc

Please sign in to comment.