amdefine: use AMD modules on Node.js
James Burke’s npm module amdefine lets you write AMD modules  that also work on Node.js. To do so, you need to perform the following steps:
The amdefine readme
has more information. Writing an AMD in this manner has one disadvantage: To use it on Node.js, one has to install amdefine.
Node’s maintainers want to keep the system small and didn’t want to build AMD support in. However, they might reconsider if demand can be proven, by enough people installing amdefine.
If you don’t want to force Node.js users of your module to install amdefine, there are alternatives  for writing AMDs that also work on Node.js. But they have other disadvantages.
- The power of the Asynchronous Module Definition
- Bridging the module gap between Node.js and browsers