Mark S. Miller
unread,Dec 26, 2011, 5:44:05 PM12/26/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to comm...@googlegroups.com, nod...@googlegroups.com, Axel Rauschmayer, Jake Verbaten
The following is from the thread at <
https://mail.mozilla.org/pipermail/es-discuss/2011-December/019020.html>. If we all agree there is a need for such functionality, then either:
a) We should revise the CJS module spec to accepts "module.exports = ...;"
b) We should revise NodeJS to accept "module.setExports(...);" and accept this proposal into CJS
c) Axel should document his boilerplate pattern as an adapter of AMD only to NodeJS modules, not CJS modules.
My favorite is #b.
---------- Forwarded message ----------
From:
Jake Verbaten <ray...@gmail.com>Date: Mon, Dec 26, 2011 at 2:02 PM
Subject: Re: ES5 Module Systems (was: Alternative proposal to privateName.public)
To: "Mark S. Miller" <
eri...@google.com>
Cc: Axel Rauschmayer <
ax...@rauschma.de>, es-discuss <
es-di...@mozilla.org>
module.exports = ... is a mechanism in node.js to overwrite the exports object entirely. (useful when you want to export, say a function rather then an object)
It seems to be similar to module.setExports and is there purely to support the implementation of the module system in node.js
--
Cheers,
--MarkM