compact icon indicating copy to clipboard operation
compact copied to clipboard

Multiple compactJsHtml functions

Open TrevorBurnham opened this issue 13 years ago • 1 comments

Because there's only one compactJsHtml function, compact doesn't allow you to create, say, one set of JS files to be concatenated in the <head> and another set to be concatenated at the end of the <body>.

How about an API that looks like this:

// Express configuration
app.use(compact.middleware({
  head: ['namespace1'],
  foot: ['namespace2']
});

// Jade template
html
  head
  != compact.head.html()
  body
    block content
    != compact.foot.html()

TrevorBurnham avatar Oct 28 '12 03:10 TrevorBurnham

Yeah, I quite like this idea. I'll take a look if it can easily be added.

serby avatar Oct 29 '12 22:10 serby