Skip to content

Commit

Permalink
fix: scan dotfiles in source paths (#253)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Dec 10, 2024
1 parent ea52155 commit fe06c67
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/make.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,20 @@ 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("#")),
)
.catch(() => []);
const filePaths = await glob(options.pattern || "**", {
absolute: false,
ignore: ignored,
cwd: options.srcDir,
dot: true,
});

const files: InputFile[] = filePaths.map((path) => {
Expand Down

0 comments on commit fe06c67

Please sign in to comment.