Closed mickgiles closed 10 years ago
Hey yeah that file will process for each .tl
file. I can't seem to duplicate your scenario. I just tested it in the sbt-dustjs-linkedin-tester
example and one of my Play 2.3.1 projects.
Can you try putting your .tl
files into the sbt-dustjs-linkedin-tester
, then start sbt in that folder and run > web-assets:assets
from the sbt console. Then tell me if your files appear properly in target/web/dustjs/main/
.
@jmparsons I was not 100% accurate that it takes the name of the first template only. There seems to be some randomness to it all. Not sure of the cause but there is a collection of test templates in my fork that will demonstrate the problem https://github.com/mickgiles/sbt-dustjs-linkedin
Ahh I see I think it has to do with the promises. I'll look into it. Thanks @mickgiles.
closed by d1461eee79785c19a4e0776f38b7f1f398d0be61
When you have multiple templates like... template1.tl template2.tl template3.tl they all get generated with the 1st template name in the dust.register call. For example, they will all start with... (function(){dust.register("template1.tl",body_0);
I haven't really dug into it but it appears that the "moduleName" is always the first template name... https://github.com/jmparsons/sbt-dustjs-linkedin/blob/master/src/main/resources/dust-shell.js#L25