dustjs
dustjs copied to clipboard
Dust compiled template name takes Folder name as well
Hi,
When we compile dust template trough command and if dust templates are in separate folders then It takes folder name as well for Dust.Register("testFolder/\templateName")
I want to generate only Dust.Register("templateName")
How I can achieve this through command? or any other solution?
I am using commanJs to compile.
Thanks in Advance
What would you expect the compiler to output if you had two templates with the same name in different folders?
If you have only one folder you can use the --pwd flag to strip it off.
On Mon, Aug 7, 2017, 11:10 PM git-vishalshukla [email protected] wrote:
Hi,
When we compile dust template trough command and if dust templates are in separate folders then It takes folder name as well for Dust.Register("testFolder/\templateName")
I want to generate only Dust.Register("templateName")
How I can achieve this through command? or any other solution?
I am using commanJs to compile.
Thanks in Advance
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/linkedin/dustjs/issues/773, or mute the thread https://github.com/notifications/unsubscribe-auth/ABVa7EAsyjN3mgI_gu5uWzAwvxcD6ZA4ks5sV_vlgaJpZM4OwSSv .
--
Sent while mobile
Currently, we can assume that template has different names even they are from separate folders.
So as per my structure it is something like this -- Folder 1> Child Folder 1 > a.dust file -- Folder 2> Child Folder 2 > b.dust file -- Folder 3> c.dust file
Do we have any command to compile all with single command which takes only name?
Thanks for quick response
You could write a prebuild step into your build pipeline that merges all files into the same folder. Dust can't assume that all your files have unique names.
On Mon, Aug 7, 2017, 11:20 PM git-vishalshukla [email protected] wrote:
Currently, we can assume that template has different names even they are from separate folders.
So as per my structure it is something like this -- Folder 1> Child Folder 1 > a.dust file -- Folder 2> Child Folder 2 > b.dust file -- Folder 3> c.dust file
Do we have any command to compile all with single command which takes only name?
Thanks for quick response
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/linkedin/dustjs/issues/773#issuecomment-320861757, or mute the thread https://github.com/notifications/unsubscribe-auth/ABVa7JYAnZos01o-LmX31Dify9eejDOmks5sV_4_gaJpZM4OwSSv .
--
Sent while mobile
Ok. Thank you.
I just wanted to create compiled file into same folder where .dust file is placed. so there will not be any name collision but if it is not supported in dust then no issue.
Thanks again
If you want the compiled file in each folder, you could just repeatedly run dustc on each folder instead of on the folder tree. Then dust wouldn't know about your folders.
On Mon, Aug 7, 2017, 11:27 PM git-vishalshukla [email protected] wrote:
Ok. Thank you.
I just wanted to create compiled file into same folder where .dust file is placed. so there will not be any name collision but if it is not supported in dust then no issue.
Thanks again
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/linkedin/dustjs/issues/773#issuecomment-320862747, or mute the thread https://github.com/notifications/unsubscribe-auth/ABVa7IYMy1eSrU_20wdf4fmZ49JVwBm7ks5sV__HgaJpZM4OwSSv .
--
Sent while mobile
Ok. Thanks