diff --git a/.github/actions/generate-help-docs.mjs b/.github/actions/generate-help-docs.mjs index 90742d4..6e9417a 100644 --- a/.github/actions/generate-help-docs.mjs +++ b/.github/actions/generate-help-docs.mjs @@ -1,9 +1,9 @@ import { execSync } from 'node:child_process' import { readFile, writeFile } from 'node:fs/promises' import { join } from 'node:path' -import { TRANSFORM_OPTIONS } from '../../config.js' +import { TRANSFORM_OPTIONS } from '../../build/config.js' -let output = execSync('node ../../index.js --help', { +let output = execSync('node ../../build/index.js --help', { encoding: 'utf-8', }) diff --git a/utils/file.ts b/utils/file.ts deleted file mode 100644 index b55063d..0000000 --- a/utils/file.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { PathLike } from 'node:fs' -import { stat } from 'node:fs/promises' -import { join, resolve } from 'node:path' -import { async as glob } from 'fast-glob' - -export async function isDirectory(path: PathLike): Promise { - try { - const metadata = await stat(path) - return metadata.isDirectory() - } catch (err) { - return false - } -} - -export async function getAllFiles(path: PathLike, arrayOfFiles: PathLike[] = []): Promise { - if (await isDirectory(path)) { - const files = await glob('**/*.{js,ts,cjs,mjs,cts,mts}', { - cwd: path.toString(), - dot: true, - ignore: ['node_modules', 'dist', 'build'], - markDirectories: true, - }) - - for (const file of files) { - arrayOfFiles.push(resolve(join(path.toString(), file))) - } - } else { - arrayOfFiles.push(resolve(path.toString())) - } - - return arrayOfFiles -}