Created
May 9, 2013 23:52
-
-
Save rmurphey/5551495 to your computer and use it in GitHub Desktop.
Revisions
-
rmurphey created this gist
May 9, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,43 @@ require(['app'], function (App) { App.init(); }); //app.js define([ 'pages' ], function (pages) { return { init : function () { var page = pages(); page() } }; }) // // pages.js define([ 'pages/home', 'pages/static' ], function (home, static) { return function () { var pages = { home : home, static : static }; var page = $('body').attr('data-page'); return pages[page]; } }) // pages/home.js define([], function () { return function () { $(document).ready(function () { }); } })