-
Notifications
You must be signed in to change notification settings - Fork 106
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
Conversation
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).
What if the project had an src dir? The .js files would get generated there? |
It's not unrelated, with this modified structure if you don't add it, the tsc compiler complains.
No, the recommended thing to do would have been to place all source files in the A future PR could move all sources to a |
Then explain this in the commit message please. And copy+paste the tsc error as well inside it. |
The 'orders' field is not part of the Mongoose document, but rather it's something that's calculated on-the-fly as part of the response to the `/findcomms` command for each community. Converting the mongoose document to a plain object gets rid of the TSC errors without having to introduce an 'orders' field to the ICommunity interface. This solution is preferred as the ICommunity interface should ideally mirror what's stored in the database.
It's very easy to check this by just creating a branch that doesn't include the commit From git checkout -b feat_dist_alone
git cherry-pick 7540d8a3126cd4239f663528a1db3f5e156d423d From there if you do
Since I didn't want to create a PR that leaves the code in a broken state I decided to add a fix to it as well, keeping it in a separate commit. However after a deeper analysis of my initial solution, I decided to remove the |
LGTM! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK
@bilthon why was strict changed from true to false?? |
Setting |
But you didn't do any new conversions in this PR. With the same amount of .ts and .js files you have made type enforcement weaker in the current codebase. |
Javascript files are now also being processed with the |
Then you should have done 2 passes, one with allowJS=true and strict=false, and anther one with allowJS=false and strict=true. Otherwise you're making the type system weaker with this PR, and for what purpose? Having files untracked by git could have been done in a much easier way with gitignore maybe. |
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.