cleanup(web): migrate to picocolors (#28039)
This commit is contained in:
parent
0d50b13a25
commit
246494ae2d
@ -4,7 +4,15 @@
|
|||||||
"overrides": [
|
"overrides": [
|
||||||
{
|
{
|
||||||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
"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"],
|
"files": ["**/*.ts"],
|
||||||
|
|||||||
@ -31,9 +31,9 @@
|
|||||||
"migrations": "./migrations.json"
|
"migrations": "./migrations.json"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chalk": "^4.1.0",
|
|
||||||
"detect-port": "^1.5.1",
|
"detect-port": "^1.5.1",
|
||||||
"http-server": "^14.1.0",
|
"http-server": "^14.1.0",
|
||||||
|
"picocolors": "^1.1.0",
|
||||||
"tslib": "^2.3.0",
|
"tslib": "^2.3.0",
|
||||||
"@nx/devkit": "file:../devkit",
|
"@nx/devkit": "file:../devkit",
|
||||||
"@nx/js": "file:../js"
|
"@nx/js": "file:../js"
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { execFileSync, fork } from 'child_process';
|
import { execFileSync, fork } from 'child_process';
|
||||||
import * as chalk from 'chalk';
|
import * as pc from 'picocolors';
|
||||||
import {
|
import {
|
||||||
ExecutorContext,
|
ExecutorContext,
|
||||||
output,
|
output,
|
||||||
@ -176,7 +176,7 @@ export default async function* fileServerExecutor(
|
|||||||
});
|
});
|
||||||
} catch {
|
} catch {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Build target failed: ${chalk.bold(options.buildTarget)}`
|
`Build target failed: ${pc.bold(options.buildTarget)}`
|
||||||
);
|
);
|
||||||
} finally {
|
} finally {
|
||||||
process.env.NX_SERVE_STATIC_BUILD_RUNNING = undefined;
|
process.env.NX_SERVE_STATIC_BUILD_RUNNING = undefined;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user