I don't think we need to go down the AMD path just yet. That said, we already provide a way to do custom builds http://aerogear.org/download/custom/. The problem is that still doesn't bundle the external deps into the built file. That's one of the points of this thread is whether or not we should. I don't think we should TBH, but I want other opinions.

On Jul 8, 2013, at 7:50 AM, Karel Piwko <kpiwko@redhat.com> wrote:

Just a guess, would not require.js and creating customized Aerogear.js bundle
per customer's scenario help here?

On Mon, 8 Jul 2013 07:03:07 -0500
Kris Borchers <kris@redhat.com> wrote:

So I have a dilemma on which I would like input from the team. In
https://issues.jboss.org/browse/AGJS-48 qmx reports that he gets:

Uncaught ReferenceError: vertx is not defined at aerogear.js:2627

when using AeroGear.js in a blank page. The reason for this is that the full
build of AeroGear.js contains the new vert.x and STOMP over websocket
adapters for Notifier. These adapters have dependencies on vertxbus.js and
stomp.js respectively. Since they are not included in the page, you get that
error. Here is the dilemma.

Do I bundle those files into AeroGear.js as part of the build when those
adapters are included or not? The reason I did not is because they are
external dependencies and I didn't want them bloating the file size just like
we do with jQuery. That said, it's obviously easy to not realize you need
those files, especially if you grab AeroGear.js and don't intend on using the
Notifier bits or just grab it and throw it in a page and see those errors as
qmx did.

Thoughts?
_______________________________________________
aerogear-dev mailing list
aerogear-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/aerogear-dev