Skip to content

Commit 036f578

Browse files
authored
fix: compile error messages (#66)
1 parent 5cd1760 commit 036f578

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/commands/compile.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import path from 'pathe'
2-
import { green, yellow } from 'colorette'
2+
import { green, yellow, red } from 'colorette'
33
import createDebug from 'debug'
44
import { CompileErrorCodes, compile } from '../api'
55
import { t } from '../i18n'
@@ -69,7 +69,7 @@ export default function defineCommand() {
6969
console.warn(
7070
yellow(
7171
t("{source}: Ignore compilation due to not supported '{ext}'", {
72-
named: { ext: parsed.ext }
72+
ext: parsed.ext
7373
})
7474
)
7575
)
@@ -78,16 +78,20 @@ export default function defineCommand() {
7878
console.log(
7979
yellow(
8080
t('Warning compilation: {source} -> {output}, {msg}', {
81-
named: { source, output, msg }
81+
source,
82+
output,
83+
msg
8284
})
8385
)
8486
)
8587
break
8688
case CompileErrorCodes.INTERNAL_COMPILE_ERROR:
87-
console.log(
88-
green(
89+
console.error(
90+
red(
8991
t('Error compilation: {source} -> {output}, {msg}', {
90-
named: { source, output, msg }
92+
source,
93+
output,
94+
msg
9195
})
9296
)
9397
)

0 commit comments

Comments
 (0)