-
Notifications
You must be signed in to change notification settings - Fork 484
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
Problem With AMD Instructions #711
Comments
How are you getting the files? From the Requirements section at the top of the article:
|
Ah, that's the problem: I downloaded from https://jqueryui.com/. Thanks. While that's definitely my fault for not reading the instructions, at the same time it seems like a mistake a lot of people would make (since normally one can download a library from its own website). You might want to consider drawing more attention to that part (just a suggestion). |
My impression is that most developers who use AMD do not manually download libraries from web sites; they use package managers. |
For what it's worth, I'm not sure that is a correct impression. Developers using AMD are almost exclusively using Require.js ... which is to say they're one step up from So, while I'm not trying to stereotype AMD/Require developers as Luddites or anything, if they were the kind of people who were eager to be using the latest technologies (such as NPM for handling client-side 3rd party libraries), they wouldn't be using Require: they'd be using Webpack or JSPM or something along those lines. For this reason, I'd be very surprised to learn that NPM-using developers were even close to a majority of all Require developers. |
I expect you'll be very surprised then. |
Hey @scottgonzalez Do you think it's worth adding emphasis to the jQuery UI download link, like:
I can see how it's possible to miss the download link and skip ahead. |
No, I think most AMD users will be using npm. This article was written when we didn't have ownership of the jquery-ui package on npm. At this point we do, but we only have 1.12.0 pre-releases published so far. Once there's a stable version on npm, I would expect the article to point to that instead of GitHub. We do currently link to Bower, but I would personally prefer for that to go away so that we continue to push the community to npm for all things JavaScript. |
It seems like things have changed since this document was written. Are there any instructions as to how to use Jquery-UI with requirejs as of 1.12.1? I see the demos in the source are using an elaborate bootstrap.js to dynamically require any used modules (from what I can tell). Is this the recommended way? SORTED: require([ "jquery-ui/autocomplete" ], function( autocomplete ) {
...
}); This works: require([ "jquery-ui/widgets/autocomplete" ], function( autocomplete ) {
...
}); |
The AMD instructions for using jQuery UI (https://learn.jquery.com/jquery-ui/environments/amd/) assume that you have a whole bunch of separate files, one for each jQuery UI component (
autocomplete.js
,dialog.js
, etc.).However, jQuery UI doesn't come packaged that way (maybe it's possible with the download builder, but the instructions on the page I linked go out of their way to say that the download builder shouldn't be needed). Instead, it comes with a single file for the entire library (
jquery-ui.js
).Could you please update these instructions to reflect the single file nature of today's jQuery UI, or else explain on those instructions where one needs to go to get the special AMD version of jQuery UI (ie. the one with separate files for each component). I'm hoping the former is possible, as having to keep a separate file for each component doesn't seem like the best idea performance-wise.
Thanks!
The text was updated successfully, but these errors were encountered: