فهرست منبع

build-llms: Clean up stale .md files before generating new ones.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Mr.doob 2 ماه پیش
والد
کامیت
f45d6f94de
1فایلهای تغییر یافته به همراه10 افزوده شده و 0 حذف شده
  1. 10 0
      utils/llms/build.js

+ 10 - 0
utils/llms/build.js

@@ -522,6 +522,16 @@ ${tslSpec}
 
 // Generate .md versions of all HTML doc pages
 const docsDir = 'docs/pages';
+
+// Remove stale .md files from previous builds
+const existingMdFiles = fs.readdirSync( docsDir ).filter( f => f.endsWith( '.html.md' ) );
+
+for ( const file of existingMdFiles ) {
+
+	fs.unlinkSync( path.join( docsDir, file ) );
+
+}
+
 const htmlFiles = fs.readdirSync( docsDir ).filter( f => f.endsWith( '.html' ) );
 
 const mdFiles = [];

粤ICP备19079148号