Closed phated closed 10 years ago
Another solution would be to start at ./ in relation to the main module.
We had tossed this idea around a bit. It sounds like the only way, atm. Fwiw, curl.js has this same issue. I had to require the domReady module as var domReady = require('curl/src/curl/domReady');
. ick.
I poked around a bit and have not found a package where it's not safe to assume that the main's directory is the module root of the package. Seems like the best way.
Sounds like a good place to start. Should we consider also looking at directories.lib
? It's allowed in both CommonJS Packages 1.1 and npm.
I'm not sure we can use directories.lib
since npm and node ignore it. If one environment uses it and another doesn't, this would prevent code from being portable between rave and node.
:+1: Sounds good to me
Frozen modules all exist in a
src
directory. There should be a way to specify where modules exist within a project.Another solution would be to start at
./
in relation to themain
module.