mimosa-server-template-compile with multiple views for one template

9 views
Skip to first unread message

simono....@gmail.com

unread,
Nov 2, 2014, 1:11:04 PM11/2/14
to mimo...@googlegroups.com
Hi, using mimosa has been a pleasant experience so far, thanks.

I'd like to be able to compile multiple views to a static html file, with the same jade-template.

In order to do that, I made some modifications to mimosa-server-template-compile.

https://github.com/simonwinkler/mimosa-server-template-compile

The desired functionality is provided with these modifications. However, one thing does not work as expected. The script logs not all success messages to the console, in spite of the fact that it successfully creates all static html files.

When I run a build with the test-config prepended to index.js in my fork, it only logs two success messages.

Success - server-template-compile wrote file public/index.html
Success - server-template-compile wrote file public/index-1.html

Correct would be:

Success - server-template-compile wrote file public/index.html
Success - server-template-compile wrote file public/index-1.html
Success - server-template-compile wrote file public/index-2.html
Success - server-template-compile wrote file public/test.html

It's only the logging that is incomplete, the corresponding files are created.

In my test-case, "__writeOutputFile" is called four times, as expected. The fs.writeFile-callback (line 186) function on the other hand is only called twice. Does anyone have an idea?

Thanks in advance
Simon

David Bashford

unread,
Nov 5, 2014, 3:44:48 PM11/5/14
to mimo...@googlegroups.com
Thanks for checking out mimosa! 

Nothing jumps to mind.  I'd have to dig in to figure out what the deal is.  Do you have a sample project with this working that I could tinker with?  Could see if I could figure it out?


--
You received this message because you are subscribed to the Google Groups "mimosajs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mimosajs+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages