How to migrate from old dojo require to the new dojo AMD loader? -
i want migrate old dojo.require loader new amd loader changed this:
dojo.require("dojo._base.xhr"); dojo.require("dojox.mobile.parser"); dojo.require("dojox.mobile"); dojo.require("dojox.mobile.scrollableview"); dojo.require("dojox.mobile.tabbar"); dojo.require("dojox.mobile.textbox"); dojo.require("dojox.mobile.compat"); dojo.require("dojox.mobile.devicetheme"); dojo.require("dojox.mobile.tabbarbutton"); dojo.require("dojox.mobile.view"); dojo.require("dojox.mobile.button"); dojo.require("dojox.mobile.switch"); dojo.require("dojo.on"); dojo.require("dijit.registry"); dojo.require("dojo.aspect"); dojo.require("dojo.ready"); dojo.require("dojox.mobile.listitem"); dojo.require("dojo.dom"); dojo.require("dojo.request"); dojo.require("dojo.dom-construct"); dojo.require("dojo.domready!"); code
to this:
require(["dojo/_base/xhr","dojox/mobile/parser","dojox/mobile","dojox/mobile/scrollableview","dojox/mobile/tabbar","dojox/mobile/textbox","dojox/mobile/compat","dojox/mobile/devicetheme","dojox/mobile/tabbarbutton","dojox/mobile/view","dojox/mobile/button","dojox/mobile/switch","dojo/on","dijit/registry","dojo/aspect","dojo/ready","dojox/mobile.listitem","dojo/dom","dojo/request","dojo/dom-construct","dojo/domready!"], function(xhr,parser,mobile,scrollableview,tabbar,textbox,compat,devicetheme,tabbarbutton,view,button,switch,on,registry,aspect,ready,listitem,dom,request){code})
is way right? have few other script files simple loaded how handle them new amd loader?
i pretty new programming stuff please soft on me :)
give try brand new converter sitepen. read here : http://www.sitepen.com/blog/2013/04/03/introducing-dojo-amd-converter/