module-alias icon indicating copy to clipboard operation
module-alias copied to clipboard

Retrieve Alias Path

Open codewith-luke opened this issue 6 years ago • 4 comments

Change

Added a method that will take a alias as a string, validate that it exists in the moduleAliase's object. and that it is of type string. This will then return the relevant path for that alias.

Reason

We came across the need in our express/typescript environment to create dynamic imports as well as fs read processes. These file paths are not imported and change depending on the environment. This will you to use the registered aliases outside of a import or require.

codewith-luke avatar Sep 18 '18 15:09 codewith-luke

I would love to see this merged. I used it to debug and it worked great.

barkdoll avatar Dec 12 '18 13:12 barkdoll

I would love to see this merged too. Any update on this?

codewith-luke avatar Dec 17 '18 11:12 codewith-luke

On a note I think the travis linting is going to cause more issues than good. As we are running different IDE styleguides. It may be beneficial for you to run your proffered settings over the project

codewith-luke avatar Feb 11 '19 10:02 codewith-luke

@lukeinthecloud, The time has passed and nothing changed. I think in that case is easier create another module called reverse-module-alias and make reverse alias/realpath conversions. :)

ghost avatar Sep 25 '20 03:09 ghost