The above approach is a bit overkill -- it'll include more code than you probably need (ie, all of TweenMax). My approach could do with more work; it'd be much better if the _gsDefine and _gsQueue were done away with entirely and replaced with require.js calls
1) wrap the js files you need with:
define(function(require){
// ORIGINAL CODE HERE
return TweenLite; // for example
});
2) For plugins, etc, you'll need to make sure that TweenLite is available before executing the plugin code. If you don't do this, you'll have a race condition and it'll work sometimes depending on which file gets loaded first:
define(function(require){
require('lib/greensock/TweenLite'); // your path may vary
// ORIGINAL CODE HERE
return CSSPlugin; // for example
});
3) Your custom module now merely needs something like:
var CSSPlugin = require('lib/greensock/plugins/CSSPlugin');
var TweenLite = require('lib/greensock/TweenLite');