Expose amplify in AMD format #43

Closed
zachleat opened this Issue Jan 4, 2012 · 16 comments

Comments

Projects
None yet
@zachleat

zachleat commented Jan 4, 2012

Now that jQuery is exposing itself w/ define, I feel like this will catch on more.

The easiest implementation would be:

define('amplify', function()
{
return amplify;
});

But the most correct would be to not use a global variable at all if an AMD loader exists on the page (underscore.js does a good job of this, I believe).

This allows amplify to be loaded using RequireJS or equivalent.

@aberman

This comment has been minimized.

Show comment
Hide comment
@aberman

aberman Feb 1, 2012

I second this issue and would love to see it done. Thanks!

aberman commented Feb 1, 2012

I second this issue and would love to see it done. Thanks!

@t2k

This comment has been minimized.

Show comment
Hide comment
@t2k

t2k Feb 4, 2012

Yuuuuuuuuuup

t2k commented Feb 4, 2012

Yuuuuuuuuuup

@ifandelse

This comment has been minimized.

Show comment
Hide comment
@ifandelse

ifandelse Apr 15, 2012

Bumping this to update everyone - the current plan is to write in AMD support - at least starting with the combined core/store/request build output. Are any of you using custom amd wrappers around the individual amplify libs? What about using amplify in projects that are mixing amd and standard js libs? (I ask that last one b/c some of the amd wrappers can have some issues in hybrid projects)....

Bumping this to update everyone - the current plan is to write in AMD support - at least starting with the combined core/store/request build output. Are any of you using custom amd wrappers around the individual amplify libs? What about using amplify in projects that are mixing amd and standard js libs? (I ask that last one b/c some of the amd wrappers can have some issues in hybrid projects)....

@zachleat

This comment has been minimized.

Show comment
Hide comment
@zachleat

zachleat Apr 18, 2012

Custom amd wrappers around individual amplify libs: no.
Using amplify in projects that are mixing amd and standard js libs: yes.

Not sure how that relates to amplify's amd support though.

Custom amd wrappers around individual amplify libs: no.
Using amplify in projects that are mixing amd and standard js libs: yes.

Not sure how that relates to amplify's amd support though.

@andrhamm

This comment has been minimized.

Show comment
Hide comment
@andrhamm

andrhamm Apr 25, 2012

This seems to work for me:

https://gist.github.com/2137980 via ifandelse

This seems to work for me:

https://gist.github.com/2137980 via ifandelse

@ifandelse

This comment has been minimized.

Show comment
Hide comment
@ifandelse

ifandelse Apr 25, 2012

@andrhamm - glad that's working. I noticed the version says 1.0.0, but it looks like the 1.1.0 code base, and when I created that gist, that's what I would have pulled...so...my bad on the wrong version in the comments. I have the AMD build pieces working locally, just need to dot my i's and cross my t's on a few things (including tests) before I submit the pull req and get it merged in...

@andrhamm - glad that's working. I noticed the version says 1.0.0, but it looks like the 1.1.0 code base, and when I created that gist, that's what I would have pulled...so...my bad on the wrong version in the comments. I have the AMD build pieces working locally, just need to dot my i's and cross my t's on a few things (including tests) before I submit the pull req and get it merged in...

@alexbeletsky

This comment has been minimized.

Show comment
Hide comment
@alexbeletsky

alexbeletsky Jun 16, 2012

@andrhamm thanks a lot, that works indeed! will be using your version, at least till new version of amplify with AMD support available :)

@andrhamm thanks a lot, that works indeed! will be using your version, at least till new version of amplify with AMD support available :)

@jcreamer898

This comment has been minimized.

Show comment
Hide comment
@jcreamer898

jcreamer898 Jul 13, 2012

Contributor

As of RequireJS 2.0, it is now possible to use non-amd modules in a project via the shim config in require.config.

Here is a gist of the working code.

https://gist.github.com/3107540

Hopefully that will help!

Contributor

jcreamer898 commented Jul 13, 2012

As of RequireJS 2.0, it is now possible to use non-amd modules in a project via the shim config in require.config.

Here is a gist of the working code.

https://gist.github.com/3107540

Hopefully that will help!

@ifandelse

This comment has been minimized.

Show comment
Hide comment
@ifandelse

ifandelse Jul 13, 2012

The shim that @jcreamer898 is talking about should work for most situations (both full AMD and hybrid projects). We will still produce an amd-compliant build at some point in the near future since a true amd version will pull amplify out of the global scope (since the shim wouldn't).

The shim that @jcreamer898 is talking about should work for most situations (both full AMD and hybrid projects). We will still produce an amd-compliant build at some point in the near future since a true amd version will pull amplify out of the global scope (since the shim wouldn't).

@mariusfilipowski

This comment has been minimized.

Show comment
Hide comment
@mariusfilipowski

mariusfilipowski Aug 15, 2012

Oh just saw that I've started another Issue on the same topic... Here is a cool site with help :
https://github.com/umdjs/umd/

Oh just saw that I've started another Issue on the same topic... Here is a cool site with help :
https://github.com/umdjs/umd/

@brianmhunt

This comment has been minimized.

Show comment
Hide comment
@brianmhunt

brianmhunt Jan 13, 2013

👍 for UMD.

👍 for UMD.

@benjamincox

This comment has been minimized.

Show comment
Hide comment
@benjamincox

benjamincox Aug 19, 2013

Is this still happening?

Is this still happening?

@dcneiner

This comment has been minimized.

Show comment
Hide comment
@dcneiner

dcneiner Aug 20, 2013

Contributor

@benjamincox Yes… I apologize for the slow inclusion of this feature. I need to get the roadmap sketched out for Amplify so we can move it forward in a more focussed way.

Contributor

dcneiner commented Aug 20, 2013

@benjamincox Yes… I apologize for the slow inclusion of this feature. I need to get the roadmap sketched out for Amplify so we can move it forward in a more focussed way.

@benjamincox

This comment has been minimized.

Show comment
Hide comment
@benjamincox

benjamincox Aug 21, 2013

Awesome! Thanks, Douglas!

On Aug 20, 2013, at 10:43 AM, Douglas Neiner notifications@github.com wrote:

@benjamincox Yes… I apologize for the slow inclusion of this feature. I need to get the roadmap sketched out for Amplify so we can move it forward in a more focussed way.


Reply to this email directly or view it on GitHub.

Awesome! Thanks, Douglas!

On Aug 20, 2013, at 10:43 AM, Douglas Neiner notifications@github.com wrote:

@benjamincox Yes… I apologize for the slow inclusion of this feature. I need to get the roadmap sketched out for Amplify so we can move it forward in a more focussed way.


Reply to this email directly or view it on GitHub.

@SiteSplat

This comment has been minimized.

Show comment
Hide comment
@SiteSplat

SiteSplat Apr 26, 2015

@ifandelse are you still around and developing this? it would be nice to know. It's been almost two years now. :-/

@ifandelse are you still around and developing this? it would be nice to know. It's been almost two years now. :-/

@zachleat zachleat closed this Dec 20, 2017

@zachleat

This comment has been minimized.

Show comment
Hide comment
@zachleat

zachleat Dec 20, 2017

If someone else wants this, please reopen with a new issue. Don’t think AMD is really relevant any more.

If someone else wants this, please reopen with a new issue. Don’t think AMD is really relevant any more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment