socketstream / ss-jade

Jade (HTML) code wrapper for SocketStream 0.3
10 stars 2 forks source link

make ss-jade accept locals from serveClient #5

Open lge88 opened 11 years ago

lge88 commented 11 years ago

This make ss-jade accept parameter from res.serveClient(). It depends on the pull: https://github.com/socketstream/socketstream/pull/341

res.serveClient('main', {
  title : 'main',
  version : '1.0'
});
paulbjensen commented 10 years ago

Hi,

Thanks for this feature addition. I like it, but I'd like to add a way to pass the options so that they are namespaced. I may adjust it so that it looks like this:

res.serveClient('main', { jade: { locals: { title : 'main', version : '1.0' } } });

The reason for wanting to do this is in case we add a feature that allows passing options to serveClient which are not to do with jade.