Closed funnylookinhat closed 8 years ago
I think this is a little too far outside of the scope of the project. Maybe you could release another module that uses app-root-path
as a dependency and adds this functionality…?
@inxilpro Sounds good! That's why I asked before flushing out tests and style too much. Thanks again for the module - it's a great tool!
I often structure applications with a
source/
anddist/
directory - being able to have code within each actually target the appropriate directory based on an environment variable is extremely useful. However, it doesn't make sense for all resolves to go to those directories, as you wouldn't build configuration files fromsource/
todist/
(they would likely be inconfig/
or something similar instead).This enables you to set
APP_RELATIVE_PATH
, which will be appended to whatever would have otherwise been resolved, and then use it withresolveRelative
andrequireRelative
.If you would like to include this please let me know and I will add the appropriate unit tests and make any necessary stylistic changes.