requirejs 定义模块中含有prototype

因为我对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的模块中可以返回一个对象/方法。

posted @ 2016-03-11 19:06  五毛钱的饼  阅读(357)  评论(0编辑  收藏  举报