scalableminds/amd-optimize — pull request #31 by kirill-konshin (2014-12-10 10:10:47+00:00)
Title: Brute-force implementation of requirejs-text plugin

I honestly don't think it is a best way to implement requirejs-text plugin, but it is something close enough. Should be OK for most cases.

As a proposal, you can build a queue of plugins where developers can intercept loading procedure for modules and do what they want with them. For example

```js
amdOptimize('foo', {
plugins: [text(), less(), typescript(), ...]
}

each plugin should provide the prefix to `resolveModuleName()` function, this prefix should trigger plugin execution later on in `defaultLoader()`. Default `js` loader should probably be one of available plugin (maybe last in the queue) so that `defaultLoader()` will remain abstract.