How to interrupt jade and concat and guess javascript files?

Here is a typical type of jade

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")

      

This usually turns into HTML, but wouldn't it be nice if the javascript was concatenated and extinct (or at least only concatenated) before it hits the browser?

Stylus does this pretty well for CSS. Is there a way to interrupt the jade before it renders HTML? Sense, can I run custom js in my app.js file before the html hits the browser?

+3
javascript node.js pug


source to share


No one has answered this question yet

See similar questions:

33
how to minify js files ok via grunt-contrib-uglify?

or similar:

7649
How does JavaScript blocking work?
7494
How can I remove a specific element from an array in JavaScript?
7432
How to check if a string contains a substring in JavaScript?
5722
How can I remove a property from a JavaScript object?
4829
How do I include a JavaScript file in another JavaScript file?
3999
How do I replace all occurrences of a string?
3998
How to validate an email address in JavaScript
3796
How do you get the timestamp in JavaScript?
3714
How to check if an array contains a value in JavaScript?
3075
How to copy to clipboard in JavaScript?



All Articles
Loading...
X
Show
Funny
Dev
Pics