Ensure _loaderHelpers registers actual filenames#24
Conversation
|
I don't believe that |
|
@jagoda, you're totally right, my bad. I noticed this as I disappointedly watched travis fail. I've updated with code that works in |
lib/manager.js
Outdated
There was a problem hiding this comment.
I don't think that this will work correctly for helpers that are in subdirectories. Any reason to not use the original approach but just replace -3 with -Path.extname(file).length?
Slicing a path by the last 3 characters works for two character extensions, e.g. `'.js'` or `'.cs'` but not for longer extensions (`'.es6'`, `'.javascript'`, `'.coffeescript'` for example). Using `Path.extname` will extract the proper extension from a path, which can then be used to determine the length of the extension proper, and thereby allowing helpers with longer extension names.
|
@jagoda amended. |
|
Cool. Looks good to me. |
|
@hueniverse I can has merge? |
|
@hueniverse I am happy to merge this if given the commit bit. |
Ensure _loaderHelpers registers actual filenames
|
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions. |
Slicing a path by the last 3 characters works for two character extensions, e.g.
'.js'or'.cs'but not for longer extensions ('.es6'for example).Using
Path.extnamewill extract the proper extension name from a path, enabling support for files with long extensions.