> index.js predates packages by quite a long time. It was the first > "load a packagey folder thing as if it was a single module" feature, > dating back to the 0.1.x days. It's not terrible. But personally I > prefer a main script in package.json, since you can name it something > more appropriate than "index.js", and somewhat like named functions, > it makes the debugging experience a bit nicer.
Very interesting, thanks. I usually lay my modules out like the following: https://gist.github.com/4611494 This gives me a lot of flexibility, and totally abstracts the require statements away from the file system. -- 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
