chore(cli): replace chalk with picocolors (#10777)
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import ora from 'ora';
|
||||
import chalk from 'chalk';
|
||||
import color from 'picocolors';
|
||||
import consola from 'consola';
|
||||
import { ROOT } from '../common/constant.js';
|
||||
|
||||
export function slimPath(path: string) {
|
||||
return chalk.yellow(path.replace(ROOT, ''));
|
||||
return color.yellow(path.replace(ROOT, ''));
|
||||
}
|
||||
|
||||
export { ora, consola };
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import chalk from 'chalk';
|
||||
import color from 'picocolors';
|
||||
import { createRequire } from 'module';
|
||||
import { createServer, build } from 'vite';
|
||||
import {
|
||||
@@ -38,8 +38,8 @@ export async function compileSite(production = false) {
|
||||
|
||||
const require = createRequire(import.meta.url);
|
||||
const { version } = require('vite/package.json');
|
||||
const viteInfo = chalk.cyan(`vite v${version}`);
|
||||
console.log(`\n ${viteInfo}` + chalk.green(` dev server running at:\n`));
|
||||
const viteInfo = color.cyan(`vite v${version}`);
|
||||
console.log(`\n ${viteInfo}` + color.green(` dev server running at:\n`));
|
||||
server.printUrls();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user