harvesthq / chosen

Deprecated - Chosen is a library for making long, unwieldy select boxes more friendly.

Home Page:http://harvesthq.github.io/chosen/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

chosen.css and chosen.jquery.js not in github?

richb-hanover opened this issue · comments

I'm completely new at this, but I don't see either the CSS or JS files for Chosen in the repo. Am I missing something? Thanks.

Because those files are generated from the SASS and CoffeeScript source files, they are not checked in. If you want the compiled sources, you can check out the releases page which has the full downloads with the generated files.

If you're interested in building the files yourself, see https://github.com/harvesthq/chosen/blob/master/contributing.md#using-coffeescript-and-grunt

@tjschuck - Thanks for the speedy response. I did see the releases page, but I didn't understand what I was looking at. If I understand you correctly:

  • chosen_v1.0.0.zip contains the essential files, specifically the .css and .js files, and minified versions of each. Most people will want the chosen_v1.0.0.zip file (that's why you colored the button green, I'll bet.)
  • The "source code" files (.zip and tar.gz) seem to be Git repositories that I could use to build from the underlying source.

Would it be possible to include a note to that effect in the Releases page? People can use that archive to get started right away with the excitement of using Chosen. Many thanks.

@richb-hanover Yep, you've got the gist of it.

  • The chosen_v1.0.0.zip file contains the compiled jQuery and Prototype versions of the JavaScript, both expanded and minified, the CSS (expanded and minified), the image sprite for the Chosen UI (both standard and retina resolutions), and the support docs (three HTML files, which are the same as the ones online: jQ version docs, Prototype version docs, and supported options).
  • The source code zip and tar.gz are both just wrapped up versions of this repository at the release's point in time.

Unfortunately, I don't think there's a way for us to add a persistent note to the Releases page about what the linked downloads include. We'd have to add the instructions to the release notes of every released version, and that could get noisy very quickly.

Instructions similar to what you're requesting could be added to the setup section of the docs, though. I opened a new issue to that effect. Feel free to submit a pull request to fix the docs if you have the time and inclination!

Here's a (potentially simplistic) suggestion: I think the problem is that you need a better name for the prebuilt files. When you removed them from the repo a month ago, it looks as if you also created a "bundle" to hold them. Alternatively, you could call them the "prebuilt files" to distinguish them from the "source files". You can then:

  • Change the green button on the Releases page to "Chosen 1.0.0 Bundle" or "Chosen 1.0.0 Prebuilt"
  • Change the Setup page to instruct people to snag the bundle or prebuilt files.

I don't think we can change the text of the button on the release page as this is a github page, not a page created by Chosen

I think the button is named whatever the zipped file is named. I'll defer to @pfiller on whether he wants to change the name.

Removing the compiled final files throws a bit spanner in the works for people using Bower as their package manager. I now have to figure out how to make compiling the source part of the Bower install for this package.

@stephencarr Chosen does not support command-line bower install chosen installation. Bower does not currently support adding a build step, but that would be a feature request you'd have to file with bower.

However, you can specify that you'd like to use the release ZIP file in your own project's bower.json file, like:

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

See #1509, #1472, #1333, and #1316 for more info.

I created a bower package for chosen. Get it with bower install chosen-bower.

I repeat what I said at #1333

The problem is not creating the package, the problem is maintaining.

bower install chosen

As of 1.4.2, Chosen supports bower installs. Read the 1.4.2 release notes for details.