diff --git a/apps/frontpage/tsconfig.json b/apps/frontpage/tsconfig.json index 4b6db576..7bacbd99 100644 --- a/apps/frontpage/tsconfig.json +++ b/apps/frontpage/tsconfig.json @@ -3,6 +3,12 @@ "compilerOptions": { "plugins": [{ "name": "next" }] }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "include": [ + "next-env.d.ts", + "**/*.ts", + "**/*.tsx", + ".next/types/**/*.ts", + "../../sync-docs.ts" + ], "exclude": ["node_modules"] } diff --git a/sync-docs.ts b/sync-docs.ts index 4be41236..8c4d5189 100644 --- a/sync-docs.ts +++ b/sync-docs.ts @@ -111,7 +111,19 @@ dotenv.config(); console.log(`\n✳︎ 👀 http://localhost:3000/docs/${slugVersion}\n`); fs.rmSync(pathToLocalDocs, { recursive: true }); - fs.cpSync(pathToStorybookDocs, pathToLocalDocs, { recursive: true }); + fs.cpSync(pathToStorybookDocs, pathToLocalDocs, { + recursive: true, + filter: (src) => { + if ( + src.includes('.prettierignore') || + src.includes('.prettierrc') || + src.includes('_assets') || + src.includes('_snippets') + ) + return false; + return true; + }, + }); fs.watch(pathToStorybookDocs, { recursive: true }, (_, filename) => { const srcFilePath = path.join(pathToStorybookDocs, filename);