Not sure about requirejs-rails, but with RequireJS it's pretty easy.
define(['dep1', 'dep2'] , function ($, otherLibrary) {
return function () {
};
});
'dep1' 'dep2' - RequireJS, . , . var, ($ otherLibrary ), - , .
, RequireJS, , , .
, "my-super-lib.js" libs, libs/my-super-lib , .
: , coffeescript. , :
define ['dep1', 'dep2'], ($, otherLibrary) ->
() ->
// your module code
.;)