From 8a8bfcb676b1f612bbd9118bb86829e6f863db0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20P=C3=BDrek?= Date: Wed, 21 Feb 2024 14:14:52 +0100 Subject: [PATCH] fix: treat npmignore like gitignore --- .../base/typescript-cdk/templates/{.npmignore => npmignore} | 0 src/index.ts | 4 +++- 2 files changed, 3 insertions(+), 1 deletion(-) rename presets/base/typescript-cdk/templates/{.npmignore => npmignore} (100%) diff --git a/presets/base/typescript-cdk/templates/.npmignore b/presets/base/typescript-cdk/templates/npmignore similarity index 100% rename from presets/base/typescript-cdk/templates/.npmignore rename to presets/base/typescript-cdk/templates/npmignore diff --git a/src/index.ts b/src/index.ts index b658e99..2ae8df9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -110,7 +110,9 @@ export async function execute(opts: { for (const file of files) { const relative = path.relative( templates, - file.replace('gitignore', '.gitignore') + file + .replace('gitignore', '.gitignore') + .replace('npmignore', '.npmignore') ) const destination = path.join(opts.destination, relative) await fs.mkdir(path.dirname(destination), { recursive: true })