egoist / egoist/tsup

Document Entry's glob pattern

Open Beginner friendly
#1,259 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
11.3k
Forks
274
PR merge metrics
No merged PRs in 30d

Description

defineConfig's entry parameter takes an Entry, and it's not clear what to write there when you want a pattern of files to be matched.
For instance, I wanted the entire base/ directory's ts files to be matched, including in subdirectories. I tried the "base/*.ts" pattern, which is the pattern used in package.json's "exports" key where a single star may match the slash of a subdirectory : it didn't work and took only the direct members of the base/ directory.
I also tried the "base/**.ts" pattern, which in some cases is supposed to match subdirectories, and more surprisingly, I got the same result.
I had to dive in the code and in tinyglobby's documentation to arrive at the guess that "base/**/*.ts" was what I was looking for, and there it actually was : it worked.

There should be a mention in the documentation that patterns are accepted by the Entries, and what syntax these patterns accept.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the documentation for defineConfig's Entry parameter and tinyglobby's pattern syntax, comparing them with package.json's exports behavior. Document that Entry accepts glob patterns and explain that base/**/*.ts matches TypeScript files in base/ and subdirectories; done when users can choose the correct recursive pattern without inspecting the code.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.