I'm coming from Zend Framework and using the bundlers found here: https://github.com/balupton/balphp/tree/master/lib/Bal/View/Helper
It supports adding script elements to your bundled js file too (so <script>alert('hello')</script> would add script('hello')\n to your bundle file - in order of course).