Skip to content

Commit

Permalink
chore: add typescript declarations to .gitignore
Browse files Browse the repository at this point in the history
When `npm`-`link`-ing Endo against external projects, the types are not resolvable without first building the declaration files (unlike how types are resolved within the project itself).  This requires compiling declaration files in the appropriate Endo workspaces and re-running as needed.

Previously, all generated declaration files (and their sourcemaps) were recognized as unstaged new files by Git, which is incredibly annoying when trying to see what changes have been made to Endo sources.

This change adds declaration files, their sourcemaps and any build cache files (`*.tsbuildinfo`) to Git's ignorelist.

Caveats:

- Any future declaration files which need to be under version control must be force-added
- When publishing, `npm`'s default behavior is to skip ignored files unless they are present in a `package.json`'s `files` array. I believe this is already configured correctly, but future packages must maintain the same strategy. I recommend carefully examining the output of `npm pack --dry-run` before the next publish to avoid regressions in the list of published artifacts.
  • Loading branch information
boneskull committed Dec 19, 2024
1 parent 14731fe commit 2e30d6a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,8 @@ dist/
api-docs

.aider*

# generated by tsc
*.d.ts*
*.d.[mc]ts*
*.tsbuildinfo

0 comments on commit 2e30d6a

Please sign in to comment.