因为我对requirejs不熟悉,不清楚如何定义带有prototype的模块,

在看了:https://gist.github.com/jonnyreeves/2474026 的demo之后,就明白了,呦西。

person.js的注释中提到requireJS simply requires us to return  a single value (function / Object) which represents this definition. In our case, we will be returning the Class' function.。

主要是说requirejs的模块中可以返回一个对象/方法。

相关文章: