码迷,mamicode.com
首页 > Web开发 > 详细

requirejs、backbone.js配置

时间:2014-05-14 03:34:11      阅读:350      评论:0      收藏:0      [点我收藏+]

标签:style   blog   class   code   java   c   

requirejs初探

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

reuqirejs、backbone的配置例子

bubuko.com,布布扣
(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();
        });
    });
})();
bubuko.com,布布扣

 



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

requirejs、backbone.js配置

标签:style   blog   class   code   java   c   

原文地址:http://www.cnblogs.com/kuikui/p/3721964.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!