Closed reduxdj closed 12 years ago
Not sure I understand your question. What do you mean "work with a callback function"? node-backbone-skeleton already has underscore support, so are you changing something?
I notice you are using erb style templating inside your index.html... I don't see anything that's generated that looks like this when I run the server:
window.templates['test'] = "<div>'test template'</div>";
I was thinking of using other template formatters, when I met callback function, I mean the writeTemplate function, which is already being called.
Thanks sorry for the confusion.
I figured out what i wanted to do, basically I generate a template that looks like this, which is just a callback function wrapper for the underscore templates:
Which renders a template that looks liket the following:
window.templates || (window.templates = {});
window.templates['test'] = function(obj){var p=[],e=_.escapeHTML,print=function(){p.push.apply(p,arguments);};with(obj||{}){p.push('
\nhello\n
By the way, thanks for your project, I'd love to fix the watch-util, since i don't know how to change path expressions in noe yet...
So directories become utils//* when coffee writes it's scripts it acutally makes folders called */ etc...
Best,
Patrick Going to close this issue
The use case I am using this app for is just development. Can you provide me an example please, of how I would make my underscore (or any type of template for that matter) work with a callback function on my html page to render my templates. Similar to how JST's work with jammit using erb style template functions. I'm not planning on serving the page/js/css files with node.
I'm not a Ruby developer so this is a great starting ground for my bolierplate.