jquery/jquery-ui — pull request #1201 by jzaefferer (2014-02-21 16:38:17+00:00)
Title: Build: Use bower to manage client-side dependencies

Fixes #9507 (eventually). This is a work-in-progress, I wanted to share what I have so far. I've used the same approach as core and sizzle, using grunt-bowercopy to replicate the existing files.

The biggest issue I see is the `jquery` dependency. Specifying `>=1.6` is nice to declare what version we depend on, but is wrong once we start actually using bower. With this in place, we end up installing `2.1.0`, which is most certainly not the right version. What we really want here is `1.10.2` or, if we were to use the latest 1.x version, `1.11.0`.

Which brings us to the next problem: Whatever that jQuery version is, it has no version in its file name, so we'd have to hard code that version in two places: Once in `bower.json`, once in the `Gruntfile` inside the `bowercopy` task. I think what we should do instead is this: Specify the actual jQuery version we want to use in `bower.json`, currently that should be `1.11.0`, then copy that to `jquery.js` in the root, and update all the references to `jquery-1.10.2.js` to just `jquery.js`. In the future we could update to newer jQuery versions by just specifying the new version in `bower.json` and running `grunt bowercopy` again.

There's a tiny shortcoming on `grunt-bowercopy` which I've [reported](https://github.com/timmywil/grunt-bowercopy/issues/14) there.

`jquery-mousewheel` is an optional, non-dev dependency, since its by spinner (not just demos). I've currently put it under devDependencies, since there's no way to mark dependencies as optional (which is probably sane). Should this go into regular dependencies instead?

Both mousewheel and jshint can be updated to newer versions, that should happen after this is done. I don't want to clutter this PR with big diffs in `external/`. Even installing the same jshint version from bower causes some whitespace changes, keep that in mind when testing this PR locally.

Overall I like this approach. Bowercopy allows us to keep our external dependencies in exactly the same place as before, while getting rid of manually updating files. Just need to figure out how to deal with our main dependency...