Closed kristianmandrup closed 9 years ago
im sorry dude, but i seem to totally miss your point.. :/ can you elaborate?
Hey,
I have the following issues:
One project, decoratow-mw has a file index.js
in the root. some files in this project uses rek to require index
. Some other files require another package middleware. In the middleware project, some files also require index
via rek. But the required package resolves index to the parent project. Is there a way to scope the local rek to only look within a certain scope?
It think it is basically since rek is a Singleton? Would be better if it was an instance and you could somehow set the root of each rek instance to a specific location.
oh i get it now :) i tried to make it so packaged will not be accessible through other packaged, so rekuire does not scan "node-modules" folder (children modules), and does not scans up (parent modules).
package.json
s?require
module is shared between them? for ex. a parent package loads the module of the child packageNo worries.
Im sorry i was waiting for your reply and since i haven't heard from you i closed thiz issue.
If you are still having problems with it, im more than happy to assist :)
In order to understand what is happening there i need to understand your file structure. If you could send me an example that demonstrate the problem i will fix it in no time :)
I was on the "same path" and developed another type of "smart loader":
Now I can do the following in LiveScript
Not bad :)
I can just tweak the following file to add more "intelligence". Note, that this way I mostly avoid file scanning (except to find my 'requires' file using
rek
).Cheers!
Could be interesting to add a similar feature to rek, as I'm sure most projects follow a certain structure like this.