jrburke/requirejs — pull request #902 by roelvanduijnhoven (2013-10-05 17:34:03+00:00)
Title: List modules inside of data main file

In this PR you'll find a unit test for a new feature I would like to propose. This feature would make it possible to annotate the contents of a main script file. For example like so:

```js

```

In this way we tell RequireJs that the `dataMain.js` file contains both `a` and `b`. This is known by RequireJs BEFORE the async call to dataMain.js is done and most of all BEFORE the execution of the rest of the page continues. Thus if a require call is made on the page to `a` or `b` we know it is already loading.

Being able to use inline `require` blocks is my primary motivation for this feature. If the contents of the main script file is annotated with it's contents this would be possible. Namely in that case no files are requested twice, thus no conflicts exist.

What do you think?