I had fun making a node.js module and a npm package.

So here is hone.js, it is using r.js and other tools to optimize and minify html, css and javascript files.

More info there:
https://github.com/soundstep/hone.js

And a quick video:

Share and Enjoy!