Hi there,

I've been trying to achieve something that should be simple but
because I'm not a node.js user (yet), I'm not sure how things should
be done.

I'm trying to create a namespace that I can load in the browser (AMD
and not AMD), and in code. I would have different files that add
functionalities to that same namespace.

http://stackoverflow.com/questions/10586873/cross-platform-javascript-namespacing

Let me know if the example is not clear, I can probably put some code
somewhere.

The idea in that post is:
- I create one namespace: "myns"
- in 1 js file I add a property to it: myns.before
- in another js file I add another property to it: myns.hello
- in another js file I add another property to it: myns.after

And I'd like to be able to log:
- myns.before
- myns.hello
- myns.after

In the example in stack overflow, it works:
- in the browser
- in the browser, loaded as a AMD module
- doesn't work in node.js, the 3 properties are separated and kind of
in different namespace.

Could someone bring me some lights how I can achieve that?

Cheers.

Romu

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to