asciidisco/grunt-requirejs — pull request #84 by ehynds (2013-12-03 19:53:45+00:00)
Title: Bug fixes with the replaceRequireScript option

This commit does two things:

1. Decouples the `replaceRequireScript` option from almond since its functionality doesn't actually depend on almond being used.
2. Gracefully handles document fragments in files defined in the `replaceRequireScript` option. Previously if a file specified in this option did not contain a `` or `

` tag then those tags would be written in. So if a file had this fragment:

```html

```

then resultant HTML would be:

```html

```

Which isn't ideal. My particular use case is replacing script tags in mustache partials. I was able to simplify the logic quite a bit using jsdom.