-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Awkwardness with components that don't have built versions in repo #150
Comments
@markmarkoh as you said, zepto does not include the built version. Anyway why not use URL directly? bower install --save http://zeptojs.com/zepto.js should work out of the box |
I think the solution here is that the zepto package for bower has the built I think this should be policy for bower packages. No build step required. On Mon, Nov 19, 2012 at 2:57 PM, André Cruz notifications@github.comwrote:
|
One of the top reasons I use bower is so I don't have to find this URL. We |
jQuery's solution puts a shim built version in https://github.com/components/jquery, along with handlebars, ember and a few other common js libraries. Would it be practical to get zepto added to components (knowing full well that this won't scale for all packages without built versions), and then get the bower package for zepto redirected to that repo? Or wait for bower's post-install script support (which would also have to install some ruby gems for zepto's case, but at least that scales)? |
so for now someone has to create and maintain zepto in components. |
Yup I wil add both of you to the components org. It's the place we're maintaining these "shim" repos for projects where it makes sense to not include the actual base repo. |
added. @markmarkoh can you fire up a zepto repo there? I think this is far preferable to a post-install script that also requires all the build tools for each project. |
Sure thing, thanks. |
Ok guys, since the postinstall script is mentioned in the roadmap, I will close this. |
It is in the registry, please take it out. |
Ok will do as soon as I got home in a couple of minutes. |
@markmarkoh done. |
Great, I'll add the repo when I get back to the office. This ticket can be
|
(added zepto shim to components and registered module with bower) |
You sure about naming components/zepto as "zepto" is a great idea? madrobby/zepto#578 (comment) |
Hello; main maintainter of Zepto here. I was the one that registered the original URL for "zepto" in Bower, which was now taken away from me. To be honest, I didn't have a good idea how to make Bower support Zepto, but I registered the name to be able to figure it out later. I don't like the fact that there's an unofficial project that's the main source of Zepto for people who install it through Bower. What if that project is not maintained anymore? Then Zepto can have as many updates, but nobody will be able to obtain them. I would like to have control over how people download Zepto through Bower. Until it supports a build step, I would like to be able to simply point it to our website and it download |
I agree with @mislav. When I do
To me, it's a priority that the official name must be the official repo too. Even if they do not support bower. For people who do not support bower, I often ask them to manage correctly tags, what they mostly do just after. Either the project supports bower and it's cool, either bower should/would work as homebrew and you've got a script that it compiles the project for you. It makes more sense for me. What do you think? |
Project in components/ have multiple maintainers so that they're always gonna have a maintainer. |
It's really a constant I'm not sure. Plus, my proposition does not interfere with your point. |
I don't know how "components/" is organized but I don't care. (I don't even understand what it is, but that's another story.) I don't want the canonical source of Zepto to be a fork. I also don't want registered names on Bower to be taken away from me. |
In other words, please standardize names.
|
@mislav components/ only supports compiled files which allows user to simply do The more I use bower, and the more I'd like to have an autoload that in fact creates a shim for requirejs or another AMD project.
I've got:
|
@mislav it was removed because zepto does not include built sources in the repo and bower does not yet support post install scripts. Therefore we replaced it with our own mirror of zepto that works 100%. As soon as bower supports the post-script I will post in this issue and let you register zepto again. |
About the post install script please follow up: #145 |
I would be happy that "zepto" is simply registered to "http://zeptojs.com/zepto.js" for now, if that would work for Bower. Is it a problem if the endpoint doesn't have a |
@mislav No, bower works without a component.js. The component.js is only needed if your project has dependencies and you must declared them there. About zepto associated with a URL:
|
Great @satazor, can't wait. |
uh, so after a year we still need to use "https://github.com/components/zepto"? The "zepto" and "zeptojs" references point to a git with no usable files. Unless I am mistaken about the requirements, this is pretty stupid. |
Are they any news on the subject ? I would like to let people install my library with bower, however I don't want my built library to be in the repository |
@edi9999 Its up to the taste of the component author. Bower as a project cannot dictate how authors build / distribute their libraries. In my opinion, built libraries should be apart of the repository (and managed by semver). Having to install / manage / build sass/styl/compass/less/coffee based components is a bad user experience. @stevenvachon thats up to the zepto project, and nothing to do with bower. |
I think for now it's best to:
I think in the future we'll replace distribution repositories with distribution servers. So if your library is Of course another way to deal with releases is to update |
@benschwarz The registered "zepto" Bower component did not work at the time of writing my above comment. I still use "https://github.com/components/zepto" instead because it works. Has the "zepto" component been corrected so that it works? |
Previously I followed the pattern of including a dist folder for my project that contains the built JS/CSS, but when I heard Bower now allowed use of hooks I thought "great!". After reading about the scripts though I was disappointed to see they only run in a parent project meaning I still need to check in built files which is disappointing. Supporting an npm style publish rather than register would be great, or simply support the postinstall hooks being run for the installed repo. In my case this would be as simple as npm install && npm run-script bundle. What is the plan of action here? Using a separate repo and/or using a dist folder in the original repo both seem like awkward solutions as does expecting the end user to add a post install script if I choose not to go with the previous two options. |
@evanshortiss Woulnd't adding such hooks would be a security issue? I agree bower should standardize build configuration, but I'm not sure they should be run automatically. Probably bower could add a field to bower.json that points to pre-built release that could be automatically downloaded instead of source release. Something like:
The only question is how to achieve backward compatibility when people stop adding |
I tried using zepto installed through bower and had a strange experience, everything else installed and worked great right out of the box (d3, backbone/_).
Here was my process, problems I found and the fix:
bower install zepto
cd
to zepto incomponents
, runrake
Am I missing something here? or is the zepto repo in a not-so-bower-friendly state?
edit: This might be something I should take up with the fine folks behind zepto, I just imagine this would be a problem for any library repo that requires a make/npm install/rake build process before it's use.
The text was updated successfully, but these errors were encountered: