diff --git a/scripts/docs-list.ts b/scripts/docs-list.ts index 06270dc20..a631726cf 100644 --- a/scripts/docs-list.ts +++ b/scripts/docs-list.ts @@ -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']);