我有一个 javascript 文件
$.fn.comments = function (method) {
    if (methods[method]) {
        return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
    } else if (typeof method === 'object' || !method) {
        return methods.init.apply(this, arguments);
    } else {
        $.error('Method ' + method + ' doesn not exists in jQuery.comments');
        return null;
    }
};
我看过介绍 requirejs 教程以从模块返回函数。
但是这个 javascript 将函数添加到 $.fn ,我该如何更改这个文件以便我可以使用 requirejs?