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
Built files ("./dist") in version-control #820
Comments
There's
Related issues from the related project :) I prefer to be less strict about VCS definition and be more accessible for all users and workflows. @jamiesonbecker has listed several valid arguments for keeping the |
t4t5/sweetalert#748 does not apply to this repo, since our unobfuscated dist files are freely accessible on the npm package distribution registry (that is where unpkg.com gets packages from), unlike @t4t5's sweetalert which only publishes the minfied/obfuscated dist files. Removing files from source-control does not mean they are removed from the package distribution.
Our distribution files are already perfectly accessible for all users and their workflows, minified or unminified, on the condition that the correct dist files are always present when you (edit: Correction: If we removed the dist from Git, the Bower workflow would not supported anymore. Thanks for making this point @toverux) I think/hope I made it clear that something that could use improvement is this package's internal workflow. I would not complain, but like I said on t4t5/sweetalert#748...
We can easily match that exactly. |
I'm not sure how many of the concerns in t4t5/sweetalert#733 I need to address.. I don't even know what @jamiesonbecker is concerned about here:
Using unpkg.com and CLI package managers like npm, bower, yarn, all give you good management over this kind of thing. It's what they do. |
Isn't bower downloading directly from GitHub? In this case, the users wouldn't have the minified versions. What about the CDNs? Publishing build artifacts on Git was common before npm. It is also seeked by users who don't use a package manager and just click on "Download ZIP" (been there). I'm not against removing them from Git because it's just better for us and our users, but I'm worried this will impact some of them, as well as (if I'm right) the Bower/CDN distributions. It's not just a " |
Ok, don't want to really judge how other people architect their build processes. There is a big world beyond NPM. Even beyond the security issues, there are build and speed issues with NPM (and bower, or any other flavor of the month) in some environments. The opportunity cost of engaging in an argument about "best" practices was just too high or waiting for a show-stopping bug for us to even be responded to, as well as rewriting all of our modal calls to meet the new incompatible API for v2. In the end, we wished that dev team well and it was just faster to switch from SA1 to our own simple/custom modal library instead of an alternative (not this project). |
I vote for removing the |
Just a suggestion - agreed completely that Most Javascript libraries are usually just a single CSS and JS, with maybe a few options for CSS themes or something. Usually, if someone says just add this |
Ah, so you are right. I was under the false impression that you had to As for CDN, are there any that we use/recommend besides unpkg.com? @limonte Yes, like @toverux expressed, I too feel bad about leaving Bower users "out in the cold". Assuming we all agree that the dist files should be removed from Git in the next major, I have two ideas on how to help them out:
|
It looks like Bower users have the option to do this: "dependencies": {
"sweetalert2": "https://unpkg.com/sweetalert2@7.3.5/dist/sweetalert2.js"
} Reference: https://github.com/sheerun/bower-away#edge-cases Maybe that should be the suggested method for Bower users. |
We are connected with some Bower users through various issues in this repo.. I am wondering if we should try to get some of them involved in this discussion |
Better yet, "dependencies": {
"sweetalert2": "v7.3.5"
} The Dist files won't be a drag if they're in Git as long as they aren't in master or any of the development branches. |
We will be implementing this in the current major version. See PR #840 |
@zenflow I tested
Could you please make the next release and validate if this happens to you as well? |
Hmm, yeah you got it. Let me know here when there's a release to make. In the meantime, what happens if you switch to the |
Nevermind, I can do a patch release now since I just merged #868. Making my first release of SweetAlert2! Woot! 😃 |
Hmm.. I did not get that problem:
Hopefully we can reproduce on your system by just running |
@limonte If you can reproduce with that command, does this fix it? https://stackoverflow.com/a/39534896 |
Update:
> git --version
git version 2.16.1
Here's the output of
I guess here's the fix for this particular issue: #875
I can't find the |
I believe something is wrong with these local tags in my repo, I will delete the local repo folder and clone it from the origin to have the fresh repo. |
Yup, that was my issue. Apologies for being a Git-newbie :) Now it works fine:
But I believe this is still a valid PR: #875, please take a look when you have time, thanks a lot for helping me out with this! |
Built files are useless redundant noise in the
git diff
(a lot of it if you can never commit them), and generally make using Git more difficult for everyoneListing them in the .gitignore does not have any effect because it does not make any sense; garbage in, garbage out.
Built files have no place in version-control (aka source-control, as in source, not build-control).
Package managers are our build-control; they are what we use to distribute/share build-code.
The text was updated successfully, but these errors were encountered: