requirejs、backbone.js配置

requirejs初探

参考资料
官网:http://requirejs.org
中文译文:http://makingmobile.org/docs/tools/requirejs-api-zh

reuqirejs、backbone的配置例子

requirejs、backbone.js配置
(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();
        });
    });
})();
requirejs、backbone.js配置

 



requirejs、backbone.js配置,布布扣,bubuko.com

requirejs、backbone.js配置

上一篇:.net 错误处理


下一篇:docker容器运行java后台程序,存到数据库的时间差一天的问题