-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Retrieve Alias Path #33
Conversation
This will retrieve an alias's path from the moduleAliases object
I would love to see this merged. I used it to debug and it worked great. |
I would love to see this merged too. Any update on this? |
test/specs.js
Outdated
}) | ||
|
||
it('should throw when alias is not a string', function () { | ||
var expected = '[123]: is not of type string'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var expected = '[123]: is not of type string'; | |
var expected = '"123" is not of type string' |
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 |
@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. :) |
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.