1
1
import { execSync } from 'node:child_process'
2
2
import { join , resolve } from 'node:path'
3
3
import process from 'node:process'
4
+ import c from 'ansis'
4
5
import fs from 'fs-extra'
5
- import c from 'picocolors'
6
6
7
7
async function run ( ) {
8
8
const dir = resolve ( __dirname , '../test/fixtures' )
@@ -16,27 +16,27 @@ async function run() {
16
16
if ( fs . existsSync ( join ( path , 'dist' ) ) )
17
17
await fs . remove ( join ( path , 'dist' ) )
18
18
19
- console . log ( c . yellow ( c . inverse ( c . bold ( ' \n Vite ' ) ) ) , name , '\n' )
19
+ console . log ( c . yellow . inverse . bold ` \n Vite ` , name , '\n' )
20
20
execSync ( 'npx vite --version' , { cwd : path , stdio : 'inherit' } )
21
21
execSync ( 'npx vite build' , { cwd : path , stdio : 'inherit' } )
22
22
23
- console . log ( c . red ( c . inverse ( c . bold ( ' \n Rollup ' ) ) ) , name , '\n' )
23
+ console . log ( c . red . inverse . bold ` \n Rollup ` , name , '\n' )
24
24
execSync ( 'npx rollup --version' , { cwd : path , stdio : 'inherit' } )
25
25
execSync ( 'npx rollup --bundleConfigAsCjs -c' , { cwd : path , stdio : 'inherit' } )
26
26
27
- console . log ( c . blue ( c . inverse ( c . bold ( ' \n Webpack ' ) ) ) , name , '\n' )
27
+ console . log ( c . blue . inverse . bold ` \n Webpack ` , name , '\n' )
28
28
execSync ( 'npx webpack --version' , { cwd : path , stdio : 'inherit' } )
29
29
execSync ( 'npx webpack' , { cwd : path , stdio : 'inherit' } )
30
30
31
- console . log ( c . yellow ( c . inverse ( c . bold ( ' \n Esbuild ' ) ) ) , name , '\n' )
31
+ console . log ( c . yellow . inverse . bold ` \n Esbuild ` , name , '\n' )
32
32
execSync ( 'npx esbuild --version' , { cwd : path , stdio : 'inherit' } )
33
33
execSync ( 'node esbuild.config.js' , { cwd : path , stdio : 'inherit' } )
34
34
35
- console . log ( c . cyan ( c . inverse ( c . bold ( ' \n Rspack ' ) ) ) , name , '\n' )
35
+ console . log ( c . cyan . inverse . bold ` \n Rspack ` , name , '\n' )
36
36
execSync ( 'npx rspack --version' , { cwd : path , stdio : 'inherit' } )
37
37
execSync ( 'npx rspack' , { cwd : path , stdio : 'inherit' } )
38
38
39
- console . log ( c . magenta ( c . inverse ( c . bold ( ' \n Farm ' ) ) ) , name , '\n' )
39
+ console . log ( c . magenta . inverse . bold ` \n Farm ` , name , '\n' )
40
40
execSync ( 'npx farm --version' , { cwd : path , stdio : 'inherit' } )
41
41
execSync ( 'npx farm build' , { cwd : path , stdio : 'inherit' } )
42
42
}
0 commit comments