scatter
scatter copied to clipboard
Feature Request: directory as dependency
Based on Node.js's require()
it should be possible for a module to be dependent not only of other modules but also of directories. The directory should be resolved to <directory>/index.js
.
If you agree I can send a PR.
I actually have mixed opinions about this feature. My main concern is that the user can end up thinking in therms of directories instead of namespaces. It's important to differentiate Scatter namespace from physical directories, nonetheless I can see some usefulness in this feature. I think implementing it should also be easy (just changes in the Resolver).
Anyway just a reminder that we should consider adding new code and features only if the effort to implement it is not greater than its advantages (or it the code is self-contained). If you already have a PR send it, if it's simple enough I'll be more than glad to merge it.
On Thu, Dec 12, 2013 at 8:00 AM, Klaus Sevensleeper < [email protected]> wrote:
Based on Node.js's require() it should be possible for a module to be dependent not only of other modules but also of directories. The directory should be resolved to
/index.js. If you agree I can send a PR.
— Reply to this email directly or view it on GitHubhttps://github.com/mariocasciaro/scatter/issues/12 .
After tests are running with 0.7.1 I can look at this issue again.