grunt-ts
grunt-ts copied to clipboard
Is it possible to specify which module to import from with Transforms?
Couldn't find it in the documentation or by digging a bit in the source code; is it possible to specify which file to import when setting up our transforms?
Say I have a Contact
file for a controller in app/controller/
and a Contact
object for my routing in app/routes
. It'd like to be able to tell grunt-ts to import not the controller but the route. Something like ts:ref=routes.Contact
.
Is this at all possible?
Is this at all possible?
Not at the moment. File names need to be be unique.
Couldn't find it in the documentation
If someone can doc this it would be great :rose:
Alright, thanks for the answer, I'll try and work around it for now.
Knowing that it's not possible though, isn't it something that would be useful? It's far from far-fetched to imagine a scenario where there are multiple files with the same name in different modules.
@gCardinal Hi - sorry this floated out there so long. I am willing to consider a PR once v5 comes out. If you're interested to create this functionality, please let me know. For now, I'll mark this as jump in.