-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
[Question] Why add *.js and *.d.ts files to source control? #658
Comments
I assume it's because this allows you you to directly use this repository as npm package. |
@weeco Quote from npmjs.org:
|
@BrunnerLivio Actually this is not correct, if there is no npmignore NPM will fallback to the gitignore. Anyways I don't see how this is relevant for your question / my response. You asked why he added the bundle to github and I told you that you could install the package right from the github repository which allows you to test the non npm published features or fixes as well. That might be the reason why he didn't exclude the bundled packages in the gitignore. |
@weeco oh got you now, kinda misunderstood you. I just checked Angular & Angular Material & they also dont seem to add the build output files to the github repository. So I don’t think you really need to support git-repository dependencies. Correct me if I’m wrong or an example when you have to use a github repo instead of an npm package as dependency. |
I remember why the compiled code is in source control: Lerna doesn't let you publish gitignor'ed directories, at least it didn't when we moved to Lerna. This is a bug with them that we've taken the fall for. As far as I know, this is still the case. A solution would be to build directly into the src directory and ignore those files, but for right now the build scripts are linked to those files. |
@wbhob this issue should get resolved if we use yarn workspaces #1060. We should focus on this PR for the 6.0.0 release. The build output will then be built inside the src directory. I can confirm this is possible because I got it working with yarn workspaces in my LXDHub project |
I think this is something that can be discussed. That does add a lot of additional learning curve/complexity. This is something we can figure out down the line after comparing pros/cons of each |
Fixed due to #1176 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Is there a reason why the *.js and *.d.ts files are added to the source control inside the
bundle
-folder?Build artifacts should usually not be stored inside a repository.
If these files get added to the .gitignore, it would lead to a smaller repository size and cleaner commits.
The text was updated successfully, but these errors were encountered: