From d8784f26c0af2cb233e15c9a5479bbbae9dda177 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Thu, 5 Dec 2024 11:19:13 -0500 Subject: [PATCH] chore: internally allow file structure to contain ignored false | undefined --- src/steps/writing/types.ts | 2 +- src/steps/writing/writeStructureWorker.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/steps/writing/types.ts b/src/steps/writing/types.ts index 6ec8160a7..20b1f30f1 100644 --- a/src/steps/writing/types.ts +++ b/src/steps/writing/types.ts @@ -1,3 +1,3 @@ export interface Structure { - [i: string]: string | Structure; + [i: string]: false | string | Structure | undefined; } diff --git a/src/steps/writing/writeStructureWorker.ts b/src/steps/writing/writeStructureWorker.ts index 9a02547d8..03a89dccb 100644 --- a/src/steps/writing/writeStructureWorker.ts +++ b/src/steps/writing/writeStructureWorker.ts @@ -16,7 +16,7 @@ export async function writeStructureWorker( path.join(basePath, fileName), await format(fileName, contents), ); - } else { + } else if (contents) { await writeStructureWorker(contents, path.join(basePath, fileName)); } }