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