-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Include compiled JS in repo for bower #1333
Comments
Hm, they just got removed recently (#1316). A solution would be to set bower to use the release zip, but as far I can see there is no possibility to link to the actual release zip in the bower package definition. |
It looks like we can create a |
@kenearley I'd just tried that and it appears that setting |
bummer 😦 |
It looks like they are working on ways to handle compiled files in Bower. We may just have to wait until it's implemented. bower/bower#584 |
This worked for me! In my
|
I've implemented this plugin to assist with this issue: |
As @kyrstenkelly pointed out, you can specify the release zip file in your own project's dependencies in its {
"name": "my-project",
"version": "1.0.0",
"dependencies": {
"jquery": "1.10.2",
"chosen": "https://github.com/harvesthq/chosen/releases/download/0.13.0/chosen_v0.13.0.zip"
}
} Unfortunately, we cannot specify that zip file in a Although @eastridge's suggestion would work, it feels a bit heavy handed. Especially if the Bower team is working to address this issue. |
@kenearley just for context, we might be able to use the github releases "get the zip" feature once there is an API for it as all of our releases our automated. Presently there is no API. Once there is one my helper might be able to go away. I also didn't see any of the issues addressed in the bower re-write, am I missing something? Would love it if you pointed me at any links / docs / discussions for that. |
@eastridge There has been some discussion about being able to run a post install script. Also improvements to the registry |
Great links! Thanks On Wed, Jul 17, 2013 at 12:13 PM, Ken Earley notifications@gh.neting.ccwrote:
|
I agree with @eastridge, the best course of action for now is probably simply waiting for either the github to release the new API or bower to improve. |
Referring back to @kyrstenkelly 's post. In our case the .js file we wanted in the zip is called "chosen.jquery.js", so we put this in our bower.json before installing: "chosen.jquery": "https://github.com/harvesthq/chosen/releases/download/1.0.0/chosen_v1.0.0.zip" Then instead of "bower install chosen", simply run "bower install". |
This was the worst workaround to the problem. You guys should provide the compiled js file untill the release api thing is done. Bummer. And the .zip solution didn't worked either:
|
@luisrudge we ended up switching to Select2... not for this reason though, for a completely different UI need. |
Having 3 different versions of the code in the VCS (coffee source, compiled code, compiled minified code) is insane:
All these are drawbacks of the previous process, which is why we changed it. On the other hand, e never advocated to support bower, even before removing the compiled code. |
@andrew-cs i would to, but i think chosen has a cleaner api and it's easier to style too... |
@stof well, thanks for pointing me the issues, but i'm sure there is a way to solve that. Maybe you should drop support of coffee script as this is the first barrier someone would face to contribute to this project. This alone would solve this issue too :) |
@luisrudge agree with you there, especially about the API! We just had a requirement that at the time only Select2 fulfilled so we switched. |
@luisrudge I'm not the lead developer of the project, and CoffeeScript was used before I even started to contribute. So I would not be the one doing such choice. and it would also require dropping the use of sass for the CSS, which would also increase the maintenance work needed (and remove the CSS customization capabilities for Sass users) |
js can't coexist with coffee? |
@luisrudge you mean maintaining a JS codebase which would not be the compiled code ? This would be totally insane. Why would we maintain 2 codebases ? |
ohhh, sorry.. I miswrote. I want to know why js can't coexist with sass.. Sorry |
@luisrudge well, if the goal is to be able to get the files from the repo itself for bower, Sass will cause the same issue for the CSS file than CoffeeScript is causing for the JS file |
Oh, right. I agree... Maybe we could investigate how other projects are doing? |
so came here wondering why I can't use chosen with bower, and leaving even more confused i.e. I thought the whole point of bower was to solve these sorts of issues |
@gaving I also think it should be bower job to fix the issue, which is why we rejected this request, telling to ask the bower team to finally implement the feature |
I created a bower package for chosen. Get it with |
The problem is not creating the package, the problem is maintaining. |
As of 1.4.2, Chosen supports bower installs. Read the 1.4.2 release notes for details. |
When installing chosen using bower:
It fetches from this repo directly, and since there is no compiled JS file, it is currently not usable with bower.
The text was updated successfully, but these errors were encountered: