From 7efdd6ac8d82cc98481bca5ff4da2e14f8876cb0 Mon Sep 17 00:00:00 2001 From: nemo Date: Fri, 20 Nov 2026 10:19:45 +0800 Subject: [PATCH] fix(docs): fail the build if generated HTML cannot be written --- docsSource/index.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/docsSource/index.js b/docsSource/index.js index 516a29c9c..61eaecfb0 100644 --- a/docsSource/index.js +++ b/docsSource/index.js @@ -19,8 +19,5 @@ const withDocs = template.replace('{{docs}}', docs); const withListAndDocs = withDocs.replace('{{list}}', list); const withVersion = withListAndDocs.replace('{{version}}', version); -fs.writeFile(output, withVersion, 'utf8', (err) => { - if (err) console.error(err); - console.log('Template compiled succesfully.'); -}); - +fs.writeFileSync(output, withVersion, 'utf8'); +console.log('Template compiled successfully.');