Skip to content

Commit

Permalink
fix: compile error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon committed Sep 19, 2023
1 parent 5cd1760 commit 26c2b9a
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/commands/compile.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import path from 'pathe'
import { green, yellow } from 'colorette'
import { green, yellow, red } from 'colorette'
import createDebug from 'debug'
import { CompileErrorCodes, compile } from '../api'
import { t } from '../i18n'
Expand Down Expand Up @@ -69,7 +69,7 @@ export default function defineCommand() {
console.warn(
yellow(
t("{source}: Ignore compilation due to not supported '{ext}'", {
named: { ext: parsed.ext }
ext: parsed.ext
})
)
)
Expand All @@ -78,16 +78,20 @@ export default function defineCommand() {
console.log(
yellow(
t('Warning compilation: {source} -> {output}, {msg}', {
named: { source, output, msg }
source,
output,
msg
})
)
)
break
case CompileErrorCodes.INTERNAL_COMPILE_ERROR:
console.log(
green(
console.error(
red(
t('Error compilation: {source} -> {output}, {msg}', {
named: { source, output, msg }
source,
output,
msg
})
)
)
Expand Down

0 comments on commit 26c2b9a

Please sign in to comment.