How to minimize jade script tag by using uglifyjs?

I have the following script tag in my jade file:

!!!5
html(lang="en")
   head
   body
     script(type='text/javascript')
       function something() {
         alert("test")
       }

How can I minimized by using uglifyjs or any existing minification?

You should be able to do it using a jade filter.

Here's a module that looks like it's implimented one: https://npmjs.org/package/jade-filter