Skip to content
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

Add bower.json and the compiled files to the repo. #2044

Closed
wants to merge 1 commit into from

Conversation

CWSpear
Copy link

@CWSpear CWSpear commented Aug 15, 2014

Fixes #1908, #1980, #1845, #1811, #1698, #1656, #1641, #1556, #1509, #1472, #1333.

Also prevents weird edge cases caused by non-standard and non-expected behaviors like in taptapship/wiredep#94.

I am curious as to why it's unacceptable for Chosen to put the built assets in the repo like thousands others have? Or maybe like some others have: why not maintain a separate for-bower-only repo (I see this one as more troublesome, but I have seen it a lot--this would cut down on people accidentally editing the compiled source. It would also help to call the output directory dist or something more commonly associated with a compiled output).

It sounds to me that you're just choosing (pun intended) to be difficult. :-P I know "just cuz everyone is doing it" isn't a good reason, but it's pretty well accepted as best practices by the community. Even the hooks that Bower did relatively recently add specifically states

These hooks are not intended to provide a post-installation build step for component authors.

Even if Bower did have a legit post install (the reason you keep saying you won't support Bower), you expect people just to use Bower to also have node, npm, grunt, and ruby installed to build your project in a post install script in Bower?? That's what's insane.

Seriously though--I'm not trying to be a jerk (it's just natural)--but please stop blaming Bower as to why you won't throw a bone to the dev community and implementors of your plugin and please really support Bower.

@tjschuck
Copy link
Member

You can just specify that you'd like to use the release ZIP, which includes the compiled and minified sources.

Either install from the command line with

$ bower install https://github.com/harvesthq/chosen/releases/download/v1.1.0/chosen_v1.1.0.zip

or add Chosen to your own project's bower.json file, like:

{
  "name": "my-project",
  "version": "1.0.0",
  "dependencies": {
    "jquery": "1.11.0",
    "chosen": "https://github.com/harvesthq/chosen/releases/download/v1.1.0/chosen_v1.1.0.zip"
  }
}

As for why we don't include the compiled sources in the repo, see @stof's comment here. We used to, and it was a nightmare.

@tjschuck tjschuck closed this Aug 15, 2014
@togakangaroo
Copy link

@tjschuck can I recommend that you mention that technique for using bower with a zip in an install section in the docs somewhere? I've been using bower for over a year and had no idea that was possible.

@tjschuck
Copy link
Member

@togakangaroo
Copy link

homer

@CWSpear
Copy link
Author

CWSpear commented Aug 15, 2014

More of a nightmare than all the confusion and PRs you get for this?

The zip still has issues (see wiredep issue), and confuses people and becomes harder to update and stuff. It's non-standard and confusing.

I read @stof's comments (I tried my best to research the topic before committing), and everyone else has to deal with those, too, and they do so swimmingly. And there are things you can do to help. Or have an official separate bower repo like Angular, so it still integrates well with the expected workflow.

@tjschuck
Copy link
Member

More of a nightmare than all the confusion and PRs you get for this?

Absolutely. Keeping the compiled sources in the repo meant we couldn't easily accept contributions and make the library better. Keeping them out means we get the occasional issue where people can't use a third-party library (that we never alleged to support!) that we can respond to with a copy-and-pasted snippet. Easy decision.

We do have a separate area where we provide the compiled sources: the releases page. If bower wants to support that better, great. But that's on them, not us.

@stof
Copy link
Collaborator

stof commented Aug 19, 2014

and note that supporting github releases in bower is a feature request since 3 years with many people asking for it. If you manage to make them move on it, lots of people will be happy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feature(bower.json): add bower.json
4 participants