On Sat, Nov 19, 2011 at 00:35, Brian LeRoux <[email protected]> wrote: > Which is actually how Gord did things ... perhaps our loader can be > AMD satisfying the technical requirements outlined here and the > definition can be in the CommonJS style. For those doing browser dev > or that want worse performance they can use the Loader. For those > building phonegap apps (into a phone) the compiler does the job.
AMD started life as CommonJS Transport/C - http://wiki.commonjs.org/wiki/Modules/Transport/C ; in CommonJS lingo, a Transport is a bit of runtime, along with some boilerplate you wrap around your module, so that you can actually get all this stuff to work. For modjewel (CommonJS module system I use for weinre), I had originally implemented Transport/D, but more recent versions use an subset of AMD as my boilerplate. So, it's pretty obvious that AMD and Node/CommonJS-styled modules can co-exist, in some sense. The big trick, for a build tool, is figuring out whether or not you have to "wrap" a .js file or not, before concatenating it to the built wad. -- Patrick Mueller http://muellerware.org
