-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
added jQueryUI 1.11 AMD Support #161
base: master
Are you sure you want to change the base?
Conversation
│ │ ├── dialog.js | ||
│ │ └── ... | ||
│ ├── jquery.js | ||
| ├── jquery.ui.touch-punch.js |
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.
the first |
is not the same as │
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.
the first is ├
, so you want all those to be │
?
for example:
│── index.html
│── js
│ │── app.js
│ │── jquery-ui
│ │ │── accordion.js
│ │ │── autocomplete.js
│ │ │── button.js
│ │ │── core.js
│ │ │── datepicker.js
│ │ │── dialog.js
│ │ │── ...
│ │── jquery.js
│ │── jquery.ui.touch-punch.js
│ └── require.js
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.
The first character of lines 60 and 61 are not alike. 60 is ok, 61 is not.
fixed first character of line 61 in readme |
+1 this one is soooooo much needed! |
Buuuuuut bug spotted. You should have wrote |
|
@furf please do not merge it until those |
My test setup:
with "jquery-ui/mouse" as a dependency requirejs did not found it, because of the wrong path: "js/jquery-ui/mouse.js" with "./jquery-ui/mouse" as a dependency all is fine for requirejs, because the path now is relative to touch punch: "js/libs/jquery-ui/mouse.js". Other setups (with bower or other) maybe don't work with this. I'm open for better suggestions to get this working in all setups. |
That's why your setup & But you have to consider people using bower for example. Files will be inside a With require you have to define all your lib path one by one
And then all your own code and all your libraries should use That's why you should use absolute and not relative path in all jquery plugin that depend on jquery parts. @theravel was right about quoting the doc he just read to quickly my messages I guess. |
Thank you @JSteunou for your explanation. I have tested my setup with your config example and it works very well. So i changed it to |
Thank you for this PR and your comprehension. |
requirejs.config({ | ||
paths: { | ||
// for example with bower | ||
'jquery-ui': 'bower_components/jquery-ui', |
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.
My example was not exact (writing from memory). its bower_components/jquery-ui/ui
@JSteunou i corrected the path in the README.md |
jQueryUI 1.11.0-beta1 added AMD Support to load all modules via RequireJS.
I've added an AMD wrapper to this plugin to support this change.