You can add support for modules from any desired structure. If the structure does not have RequireJS support, you can make a wrapper file for loading the framework.
Zepto Example shell file:
define(['lib/zepto'], function() { require(['lib/zepto']); return this.Zepto; });
In your application, you define a route for Zepto in a wrapper file and let it load lib.
Main application file:
require({paths: { 'zepto': 'wrapper/zepto' } });
Thus, your application file structure will look something like this:
main.js lib/zepto.js wrapper/zepto.js
Thus, any infrastructure can support RequireJS, but you will need to write some shells for modules that have not added support for AMD loaders.
EDIT 07/07/2012:
RequireJS 2. + has a new function called shim
that allows you to use any browser-based framework with it.
And a new feature for creating server-side shells other than AMD requires the offer of CommonJS templates.
source share