Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduces 'dist' dir #606

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bilthon
Copy link
Contributor

@bilthon bilthon commented Nov 14, 2024

This change avoids having so many untracked JS files generated by the typescript compiler. This project doesn't have a src dir and instead all files (.ts and .js) are kept at root. The problem is that for every file that is ported to typescript a new .js file will be generated. But since this is a generated file it shouldn't be tracked by the version control system. On the other hand we cannot also add all .js files to the .gitignore file.

@knocte
Copy link
Contributor

knocte commented Nov 15, 2024

It seems the first commit of this PR is unrelated? Looks like it should be moved into its own PR explaining the reason for the change (not just what the change is doing).

This project doesn't have a src dir

What if the project had an src dir? The .js files would get generated there?

@bilthon
Copy link
Contributor Author

bilthon commented Nov 15, 2024

It seems the first commit of this PR is unrelated? Looks like it should be moved into its own PR explaining the reason for the change (not just what the change is doing).

It's not unrelated, with this modified structure if you don't add it, the tsc compiler complains.

What if the project had an src dir? The .js files would get generated there?

No, the recommended thing to do would have been to place all source files in the src dir, and add them all (.ts and .js) to version control. But this change would be too large to review, so I decided to just keep sources in the root dir, move all the generated files to dist and add dist to the gitignore.

A future PR could move all sources to a src dir and uptade the tsconfig file accordingly.

@knocte
Copy link
Contributor

knocte commented Nov 16, 2024

It's not unrelated, with this modified structure if you don't add it, the tsc compiler complains.

Then explain this in the commit message please. And copy+paste the tsc error as well inside it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants