Here's a typical jade view
extend layout
block head
script(src="/js/polyfills/html5shiv.js")
block body
header
nav...
main
section
form...
footer
nav...
script(src="/js/polyfills/arrayGenerics.js")
script(src="/js/polyfills/placeholder.js")
script(src="/js/formSubmitter.js")
Normally this is turned into HTML, but wouldn't it be nice if the javascript were concatenated and uglified (or at least just concatenated) before it hit the browser?
Stylus does this for CSS quite nicely. Is there a way to interrupt jade before it renders HTML? Meaning, can I run custom js in my app.js file before the html hits the browser?