yortus / require-self

Lets you require('foobar') from within foobar itself
MIT License
19 stars 5 forks source link

relative path? #11

Closed nevir closed 4 years ago

nevir commented 6 years ago

I'm wondering if it would make sense for require-self to generate a relative path to the module rather than absolute? That way, the user can move their repo around on disk without having to re-run require-self.

yortus commented 6 years ago

@nevir it used to be require('..'), but was changed in PR #7 to support scoped packages. You could probably still generate a relative path and support both scoped and unscoped packages (eg using path.relative(...). A PR would be welcome, as I'm not actively using this lib atm.

yortus commented 4 years ago

Closing as stale.