The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
On Wed, Feb 22, 2012 at 2:13 AM, olivernn <oliver.nightinga...@gmail.com> wrote:Here are some examples of the types of optional define() calls you can do:
> I have an open source library, http://davisjs.com, that I want to add
> optional AMD support to and am wandering about the best way to go
> about this.
I suggest this one for this case:
if you think this library may be mixed an matched in an AMD
> The main library by default requires jQuery, but can be used withYes, use 'jquery' as the dependency name (in the above links in place
> other dom libraries, such as Zepto. Do I need to declare jQuery as a
> dependency when calling define with my library?
of the 'b' dependency). An developer using AMD can map 'jquery' to
point to the Zepto file, and use a tool to wrap Zepto in a define
call. In that way, Zepto can be used in place of the 'jquery'
> Also Davis.js has a plugin system, with some default plugins provided,Yes, same approach as above, but I would use 'davis' as the dependency
> should these also be available as AMD modules, using the define
> method? If so how do I include the main library as a dependency?
name, and then optionally also passing in 'jquery' if the plugins need
jquery too. I would use 'davis' and not 'Davis', since 'davis' matches
the file name -- dependency IDs get mapped to file paths.
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.