cleanup(misc): migrate rollup to picocolors (#28186)
This commit is contained in:
parent
74061cf5ef
commit
2f09285b30
@ -4,7 +4,15 @@
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
||||
"rules": {}
|
||||
"rules": {
|
||||
"no-restricted-imports": [
|
||||
"error",
|
||||
{
|
||||
"name": "chalk",
|
||||
"message": "Please use `picocolors` in place of `chalk` for rendering terminal colors"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["*.ts", "*.tsx"],
|
||||
|
||||
@ -35,8 +35,8 @@
|
||||
"@rollup/plugin-json": "^6.1.0",
|
||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||
"autoprefixer": "^10.4.9",
|
||||
"chalk": "^4.1.0",
|
||||
"minimatch": "9.0.3",
|
||||
"picocolors": "^1.1.0",
|
||||
"postcss": "^8.4.38",
|
||||
"rollup": "^4.14.0",
|
||||
"rollup-plugin-copy": "^3.5.0",
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import * as chalk from 'chalk';
|
||||
import * as pc from 'picocolors';
|
||||
import { logger } from '@nx/devkit';
|
||||
|
||||
const formatBytes = (bytes) => {
|
||||
@ -16,7 +16,7 @@ export function analyze() {
|
||||
renderChunk(source, chunk) {
|
||||
const sourceBytes = formatBytes(source.length);
|
||||
const fileName = chunk.fileName;
|
||||
logger.info(` ${chalk.bold(fileName)} ${chalk.cyan(sourceBytes)}`);
|
||||
logger.info(` ${pc.bold(fileName)} ${pc.cyan(sourceBytes)}`);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user