require statement. For example i have this structure:project
|
+-helpers
| |
| +-helper1.js
| +-helper2.js
| +- ...
|
+-modules
|
+-moduleDirectory1
| |
| +-module11.js
| +-module12.js
|
+-moduleDirectory2
|
+-module21.js
+-module22.js
And modules which use helpers just include them this way:
// for example module11.js
var helper1 = require('helpers/helper1');
var helper2 = require('helpers/helper2');
helper1.someFunction();
Application work just fine, but the development tools like ternjs,
and node plugin for vim don't recognize this statement properly. When I
replace it with something like this: require('../../helpers/helper2') plugins start work.
I've searched a while but didn't find any information about
"requiring" regular files without absolute path. Only about
node_modules in official docs:
>> Without a leading '/' or './' to indicate a file, the module is either
a "core module" or is loaded from a node_modules folder.
>> 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?
--
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 nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/a9d3b26c-9724-49a2-bc5e-b1011ba3ef3a%40googlegroups.com.
├── package.json├── readme.MD└── SOURCE├── index.js└── node_modules├── _client│ └── index.js├── _config.js├── _server│ └── index.js└── _shared└── index.js
--
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 nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/23f45c37-314d-4381-8a66-08318661966e%40googlegroups.com.
--
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 nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/998c2d12-5e1a-4978-8d21-f6cff880b720%40googlegroups.com.