From ca99ced22fae123450210d83ac3b2097dd91d20f Mon Sep 17 00:00:00 2001 From: Grant Jennings Date: Wed, 27 Oct 2021 10:38:59 -0400 Subject: [PATCH 1/2] allow setting directory isAsync = false in options --- src/scan.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scan.ts b/src/scan.ts index e429be7..1eb9e36 100644 --- a/src/scan.ts +++ b/src/scan.ts @@ -39,7 +39,7 @@ export async function scanComponents (dirs: ScanDir[], srcDir: string): Promise< if (fileName.toLowerCase() === 'index') { fileName = pathPrefix === false ? basename(dirname(filePath)) : '' /* inherits from path */ } - const isAsync = (fileName.endsWith('.async') ? true : dirIsAsync) || null + const isAsync = (fileName.endsWith('.async') ? true : dirIsAsync) ?? null fileName = fileName.replace(/\.async$/, '') const fileNameParts = splitByCase(fileName) From c8f8f135d9cad46a22334d37d90ac131f6c7c2b9 Mon Sep 17 00:00:00 2001 From: Grant Jennings Date: Wed, 27 Oct 2021 10:40:44 -0400 Subject: [PATCH 2/2] Update scan.ts --- src/scan.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scan.ts b/src/scan.ts index 1eb9e36..dee3cc4 100644 --- a/src/scan.ts +++ b/src/scan.ts @@ -39,7 +39,7 @@ export async function scanComponents (dirs: ScanDir[], srcDir: string): Promise< if (fileName.toLowerCase() === 'index') { fileName = pathPrefix === false ? basename(dirname(filePath)) : '' /* inherits from path */ } - const isAsync = (fileName.endsWith('.async') ? true : dirIsAsync) ?? null + const isAsync = (fileName.endsWith('.async') ? true : dirIsAsync) ?? true fileName = fileName.replace(/\.async$/, '') const fileNameParts = splitByCase(fileName)