requirejs、backbone.js配置
时间:2014-05-14 03:34:11
收藏:0
阅读:350
requirejs初探
参考资料
官网:http://requirejs.org
中文译文:http://makingmobile.org/docs/tools/requirejs-api-zh
reuqirejs、backbone的配置例子
(function(){ require.config({ baseUrl: "../js", paths: { jquery: "libs/jquery.min", underscore: "libs/underscore.min", backbone: "libs/backbone.min", localstorage: "libs/localStorage" }, shim: { underscore: {exports: "_"}, backbone: { deps: ["underscore","jquery"], exports: "Backbone" } } }); require(["mbase","dotos"],function(mbase,doto){ mbase.mbase.loadCss("../css/dotos.css"); $(function(){ doto.run(); }); }); })();
评论(0)