> >> Without a leading '/' or './' to indicate a file, the module is either
> a "core module" or is loaded from a node_modules folder.
>
> Is it a good idea to use including a regular files without an absolute
> paths?
>
You in fact cannot include your own package's files without ./ -- if you
omit that, you're stuck with absolute paths (never a good idea in a
portable module without good reason), or loading from other modules --
require('helper/index.js') loads index.js from the helper module in
node_modules; require('./helper/index.js') loads index.js from the helper
directory next to the file the statement is in. Very different behaviors
and meanings.
--
Job board: http://jobs.nodejs.org/
New group rules:
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules:
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/nodejs/a9d3b26c-9724-49a2-bc5e-b1011ba3ef3a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.