-
Notifications
You must be signed in to change notification settings - Fork 117
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
Take generated files out of version control #228
Comments
@joshuacc I was about to do this, mostly because I'm getting annoyed at having to uncheck the modified dist files every time I commit through my editor. However, there is a catch. If we add the generated files to the .gitignore and remove them from VCS, we have to be very careful to undo these changes (i.e., remove the .gitignore lines and re-commit the generated files) the first time we merge There is also the disadvantage that if people download a zip of the source code, they will get no documentation until they install the dependencies and run the build steps. There is something to say for having everything committed like in Underscore, too. In Underscore, there is even a pre-commit hook that keeps the non-minified dist files in sync with the source, so you can always download a bleeding-edge version from the website. So, where do we take this? |
I see a couple of different concerns here. First, the generated JS files. Those can be generated as part of a pre-publish script instead of a pre-commit. Then there is no need to keep them in git at all. Second, the generated HTML docs. I don't think those need to be present in git or the published package. The markdown docs are already available there. But if you do want them published in the npm package, just do it as part of the pre-publish script. |
While I don't necessarily disagree, I think it is a bit more nuanced than you paint it:
I'm going to take a dive into GH Actions in order to enable CI. While I'm at it, I'll investigate whether it might could help us with this issue as well. It's easier to make choices when all the options are on the table. |
I'm honestly fine with you doing this however you want, so take the following as you will. :-) For the generated JS files, I don't see any benefit to keeping them in git. Bower is deprecated. If we want to offer a non-npm method of downloading the minifified version, that could just be hosted on GitHub pages as part of the docs site. For GitHub pages generation, this action should help: https://github.com/marketplace/actions/deploy-to-github-pages |
Thanks for the trust, and for the helpful pointer. :-) I've exercised with CI (#230) and I plan to add CD in one go. Despite your kind gesture, I'm still going to ask your opinion, because I prefer to set up a scheme that both of us really like if I can help it. The plan I'm going to describe may appear a bit complicated, but hopefully you'll agree it all makes sense. My main objectives are the following:
As I currently envision it, cutting a new release would consist of the following steps.
To make this work, some one-time preparations would be required:
Please let me know what you think. If you have any hesitation, even a very slight one, I want to know it. I will not proceed until I have your feedback. |
It looks a little more complicated than I prefer, but I have no fundamental objections. My only request is that the process gets documented in a markdown checklist somewhere so that maintainers can follow through on each item without losing where they were. |
This exact process is not sacred to me, as long as we meet the goals. So if you have any ideas, even if they don't entirely meet the goals, I'd be interested to hear them. I'd prefer simpler, too, but haven't been able to come up with a simpler flow yet. |
I suggest going with this. After it has actually been used a time or two, I think any important improvements will become obvious. |
This reverts commit e166a00. On the prepublish branch, we do want these files to be committed.
@joshuacc FYI, I have executed the branch changes as described above. We now have:
If you fetch and track these branches locally, you can run I'll continue with CD in #230 soon. |
I agree with #211 (comment) by @joshuacc. Same applies to the dist files. We can tell git to delete them, add them to the
.gitignore
, and then continue business as usual.The text was updated successfully, but these errors were encountered: