首页 > 网站 > WEB开发 > 正文

requirejs、backbone.js配置

2024-04-27 14:24:14
字体:
来源:转载
供稿:网友

requirejs、backbone.js配置

requirejs初探参考资料官网:http://requirejs.org中文译文:http://makingmobile.org/docs/tools/requirejs-api-zhreuqirejs、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();        });    });})();


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表