From e579127c9a86b7f21b1f8212b345ec8f0a04fc5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Par=C3=A9-Simard?= Date: Fri, 13 Sep 2024 11:01:50 -0400 Subject: [PATCH] Add `index` for folder export with extension provided --- src/commands/ExportAll.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/commands/ExportAll.ts b/src/commands/ExportAll.ts index d3cff8e..d8fa0ad 100644 --- a/src/commands/ExportAll.ts +++ b/src/commands/ExportAll.ts @@ -132,6 +132,11 @@ export class ExportAll { ? fileExtension : `.${fileExtension}`; } + if (fileExtension && item.type === "folder") { + fileSuffix = fileExtension.startsWith(`.`) + ? `/index${fileExtension}` + : `/index.${fileExtension}`; + } if (namedExports) { const filePath = join(uri.fsPath, item.name);