jrburke/require-cs — pull request #35 by guybedford (2012-11-14 17:39:00+00:00)
Title: Require-inline support

This is a hopeful pull request. My expectation is to be shot down briskly. But since this is the core of my workflow right now I need to give it a go.

Basically, I'm using [require-inline](https://github.com/guybedford/require-inline) to sync download progressive enhancement dependencies that are critical for the current point in the page load. I think this is a fundamental issue and this solves it in RequireJS quite neatly, with no risk. In-page code being a separate use case to post-page-load code, which should always be async.

If I write a module with require-cs, I immediately lose this benefit due to the AJAX call. But if it just checks one flag to provide sync AJAX that will solve this entirely.

The flag is created during a sync cycle and removed in the same cycle, so there is no chance of leakage into other requires.

Happy to discuss further, and thanks for taking the time to consider as always.