-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Build: Use bower to manage client-side dependencies #1201
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
Conversation
The shortcoming in grunt-bowercopy has been fixed. See version 0.8.0. |
After discussing this with Scott, a few things left do to, addressing the issues I mentioned above:
|
I like using For the jQuery dependency in Is it possible to list a file both as a |
Considering that this repo isn't in the bower registry, I hope this just doesn't matter.
I tried that, it will just install |
I've updated this PR to address most of the issues outlined above. There's currently an issue with the mousewheel plugin that I hope to get addressed soon - it only affects tests anyway. I've updated jshint as well. It doesn't run in IE8, but since we already catch that, I don't see a problem there. |
This looks good to me. |
Apart from getting the mousewheel plugin fixed, we also need to update the build-demos task in jqueryui.com |
I've updated this again to drop the mousewheel plugin update. Should be good to land now. @scottgonzalez can you confirm? |
"external": "qunit/qunit" | ||
} | ||
}, | ||
// can be updated to 3.1.9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this comment.
I just want @rxaviers to confirm that the name change for |
@scottgonzalez, DB updated accordingly. |
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 installing2.1.0
, which is most certainly not the right version. What we really want here is1.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 theGruntfile
inside thebowercopy
task. I think what we should do instead is this: Specify the actual jQuery version we want to use inbower.json
, currently that should be1.11.0
, then copy that tojquery.js
in the root, and update all the references tojquery-1.10.2.js
to justjquery.js
. In the future we could update to newer jQuery versions by just specifying the new version inbower.json
and runninggrunt bowercopy
again.There's a tiny shortcoming on
grunt-bowercopy
which I've reported 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...