chore: resolve docs list from cwd

This commit is contained in:
Peter Steinberger
2025-12-23 00:28:43 +00:00
parent 918cbdcf03
commit 2b20e3d2b0

View File

@@ -1,8 +1,7 @@
#!/usr/bin/env tsx
import { readdirSync, readFileSync } from 'node:fs';
import { dirname, join, relative } from 'node:path';
import { fileURLToPath } from 'node:url';
import { join, relative } from 'node:path';
process.stdout.on('error', (error) => {
if ((error as NodeJS.ErrnoException).code === 'EPIPE') {
@@ -11,9 +10,7 @@ process.stdout.on('error', (error) => {
throw error;
});
const docsListFile = fileURLToPath(import.meta.url);
const docsListDir = dirname(docsListFile);
const DOCS_DIR = join(docsListDir, '..', 'docs');
const DOCS_DIR = join(process.cwd(), 'docs');
const EXCLUDED_DIRS = new Set(['archive', 'research']);