Skip to content

Commit

Permalink
chore: Ignore node_modules when generating docs
Browse files Browse the repository at this point in the history
  • Loading branch information
raon0211 committed Apr 19, 2024
1 parent 6cf1de0 commit dd13b08
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/scripts/build-docs/generate-docs-from-md.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async function copyMDDocs(outdir: string, exclude: string[]) {

async function generateLanguageDocs(lang: string, outdir: string) {
const filepaths = await glob(`**/*.${lang}.md`, {
ignore: [`**/README.${lang}.md`],
ignore: [`**/README.${lang}.md`, '**/node_modules/**/*'],
cwd: PACKAGES_ROOT,
});

Expand All @@ -51,7 +51,7 @@ async function generateLanguageDocs(lang: string, outdir: string) {
}

async function generateDefaultREADMEDocs(outdir: string) {
const filepaths = await glob(`**/README.md`, { cwd: PACKAGES_ROOT });
const filepaths = await glob(`**/README.md`, { cwd: PACKAGES_ROOT, ignore: ['**/node_modules/**/*'] });

await Promise.all(
filepaths.map(async filepath => {
Expand All @@ -67,7 +67,7 @@ async function generateDefaultREADMEDocs(outdir: string) {
}

async function generateI18nREADMEDocs(lang: string, outdir: string) {
const filepaths = await glob(`**/README.${lang}.md`, { cwd: PACKAGES_ROOT });
const filepaths = await glob(`**/README.${lang}.md`, { cwd: PACKAGES_ROOT, ignore: ['**/node_modules/**/*'] });

await Promise.all(
filepaths.map(async filepath => {
Expand Down

0 comments on commit dd13b08

Please sign in to comment.