1
1
#!/usr/bin/env node
2
2
3
- import chalk from 'chalk'
4
3
import mri from 'mri'
4
+ import picocolors from 'picocolors'
5
5
6
6
import prettyQuick from '.'
7
7
@@ -16,36 +16,36 @@ const prettyQuickResult = prettyQuick(process.cwd(), {
16
16
...args ,
17
17
onFoundSinceRevision : ( scm , revision ) => {
18
18
console . log (
19
- `🔍 Finding changed files since ${ chalk . bold ( scm ) } revision ${ chalk . bold (
20
- revision ,
21
- ) } .`,
19
+ `🔍 Finding changed files since ${ picocolors . bold (
20
+ scm ,
21
+ ) } revision ${ picocolors . bold ( revision ) } .`,
22
22
)
23
23
} ,
24
24
25
25
onFoundChangedFiles : changedFiles => {
26
26
console . log (
27
- `🎯 Found ${ chalk . bold ( changedFiles . length ) } changed ${
27
+ `🎯 Found ${ picocolors . bold ( changedFiles . length ) } changed ${
28
28
changedFiles . length === 1 ? 'file' : 'files'
29
29
} .`,
30
30
)
31
31
} ,
32
32
33
33
onPartiallyStagedFile : file => {
34
- console . log ( `✗ Found ${ chalk . bold ( 'partially' ) } staged file ${ file } .` )
34
+ console . log ( `✗ Found ${ picocolors . bold ( 'partially' ) } staged file ${ file } .` )
35
35
} ,
36
36
37
37
onWriteFile : file => {
38
- console . log ( `✍️ Fixing up ${ chalk . bold ( file ) } .` )
38
+ console . log ( `✍️ Fixing up ${ picocolors . bold ( file ) } .` )
39
39
} ,
40
40
41
41
onCheckFile : ( file , isFormatted ) => {
42
42
if ( ! isFormatted ) {
43
- console . log ( `⛔️ Check failed: ${ chalk . bold ( file ) } ` )
43
+ console . log ( `⛔️ Check failed: ${ picocolors . bold ( file ) } ` )
44
44
}
45
45
} ,
46
46
47
47
onExamineFile : file => {
48
- console . log ( `🔍 Examining ${ chalk . bold ( file ) } .` )
48
+ console . log ( `🔍 Examining ${ picocolors . bold ( file ) } .` )
49
49
} ,
50
50
} )
51
51
@@ -55,7 +55,7 @@ if (prettyQuickResult.success) {
55
55
if ( prettyQuickResult . errors . includes ( 'PARTIALLY_STAGED_FILE' ) ) {
56
56
console . log (
57
57
'✗ Partially staged files were fixed up.' +
58
- ` ${ chalk . bold ( 'Please update stage before committing' ) } .` ,
58
+ ` ${ picocolors . bold ( 'Please update stage before committing' ) } .` ,
59
59
)
60
60
}
61
61
if ( prettyQuickResult . errors . includes ( 'BAIL_ON_WRITE' ) ) {
0 commit comments