Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Nowely committed Jun 13, 2024
1 parent cb21601 commit ee45f1b
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions prepack.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,21 @@ function rollupTypes() {

const config = api.ExtractorConfig.prepare(getOptions())
const result = api.Extractor.invoke(config, {showVerboseMessages: true})
if (result.succeeded) {
console.log(`Types rollup completed successfully`)
process.exitCode = 0
} else {
console.error(`Types rollup completed with ${result.errorCount} errors and ${result.warningCount} warnings`)
process.exitCode = 1
switch (true) {
case result.succeeded: {
console.log(`Types rollup completed successfully`)
process.exitCode = 0
break
}
case result.errorCount === 0: {
console.log(`Types rollup completed successfully with ${result.warningCount} warnings`)
process.exitCode = 0
break
}
default: {
console.error(`Types rollup completed with ${result.errorCount} errors and ${result.warningCount} warnings`)
process.exitCode = 1
}
}


Expand Down

0 comments on commit ee45f1b

Please sign in to comment.