From 4800bfc577accfe178e218476c6c81a784fc89c9 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Sat, 28 Dec 2024 16:40:43 +0100 Subject: [PATCH] fix: only add known ignore patterns by default (#279) --- src/make.ts | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/make.ts b/src/make.ts index 6c4da9f..08e1ad4 100644 --- a/src/make.ts +++ b/src/make.ts @@ -49,21 +49,9 @@ export async function mkdist( } // Scan input files - const ignored = await fsp - .readFile(resolve(options.rootDir, ".gitignore"), "utf8") - .then((r) => - r - .split("\n") - .map((r) => r.trim()) - .filter((r) => r && !r.startsWith("#")) - // Gitignore => Glob - // TODO: https://github.com/unjs/mkdist/issues/271 - .map((r) => (r.startsWith("/") ? r.slice(1) : r)), - ) - .catch(() => []); const filePaths = await glob(options.pattern || "**", { absolute: false, - ignore: ignored, + ignore: ["**/node_modules", "**/coverage", "**/.git"], cwd: options.srcDir, dot: true, ...options.globOptions,