Skip to content

Commit

Permalink
Fail the run on warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
NWylynko committed Mar 6, 2025
1 parent 81332d6 commit 322c333
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions scripts/build-docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -951,10 +951,16 @@ const main = async () => {

const store = createBlankStore()

await build(store, config)
return await build(store, config)
}

// Only invokes the main function if we run the script directly eg npm run build, bun run ./scripts/build-docs.ts
if (require.main === module) {
main()
(async () => {
const output = await main()

if (output !== '') {
process.exit(1)
}
})()
}

0 comments on commit 322c333

Please sign in to comment.