shakyShane/browser-sync — pull request #32 by aesthaddicts (2013-12-18 00:29:19+00:00)
Title: Fix AMD support

This fixes support for AMD loaders like [curl.js](https://github.com/cujojs/curl).
Snippets are now inserted *before* the first script tag inside the body – if there are no script tags inside the body, the old logic of placing it before `

` is used.
It's fix a bit fragile since it uses regexes for HTML-parsing. I found it to break when my first script tag was wrapped inside a comment, however I did not want to use a complete library for DOM manipulation.