Hmm we can do. It would have to be sent before any scripts which use templates, but that is doable.
Any particular reason you don't like the code in the head tag?
In the usecase of having both express and ss at the same time, and reusing some of the ss templates, it might make sense to have this option.
Agreed. Spoke about this on the newsgroup too. For 0.4 I'd like any dom elements to output to the HTML view and all other code to go into a seperate JS file, auto loaded before everything else, and then packed into the same main .js file as everything else.
any chance of having this any time soon?
Sadly I'm not able to do that right now. If I could work on SocketStream as part of my job, that would be great, but sadly I'm doing more of a sysadmin/full-stack dev/qa job at the moment.
From the other hand in some cases header <script> templates needed for third party plugins as angular-ui/bootstrap, where templates calls hardcoded as
It's why I came up with ss-angular-templates module for SocketStream.
This can be done as a plugin. I would suggest to treat this a Documentation Request
@thepian is this something that can be done for 0.3.12, or would depend on a major update (i.e. 0.4).
With 0.4 you should be able to make a modified bundler that does what you want. But I suppose we could still have a look at supporting more options for bundling templates.
So I'd like to see more options around template bundling.