Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add TS-generated files to gitignore
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.** ## Escape Hatch Sometimes it's helpful to keep declarations under version control. To that end, any _new_ declaration file that needs to be tracked should match `^.+\.types\.d\.[mc]?ts$`. Example: `foo.types.d.ts`. This will avoid the need to force-add the file to Git. ## Notes - To avoid the need to rename files (e.g., the various `types.js` files amongst the workspaces), the pattern `^types.*\.d\.[mc]?ts$` was **not** chosen. - If the need arises to track a directory full of declaration files, another convention can be established and appended to the ignorefile. - All `clean` scripts will need to be updated, since `git clean` needs another flag (`-X`) to delete _ignored_ files.
- Loading branch information