View difference between Paste ID: W5Le28Ys and 7tLSn2eL
SHOW: | | - or go back to the newest paste.
1
/* From my index.html 
2
<script data-main="js/main" src="js/libs/require/require.js"></script>
3
*/
4
5
/* Main.js */
6
require.config({
7
    paths:{
8
        jquery:'libs/jquery/jquery-1.7.2.min',
9
        underscore:'libs/underscore/underscore-min',
10
        backbone:'libs/backbone/backbone-min',
11
        text:'libs/require/text',
12
        order:'libs/require/order',
13
        xdomainajax:'libs/jquery/jquery.xdomainajax'
14
        //templates: '../templates'
15
    }
16
17
});
18
19
//Loading up the required library dependencies and the app.
20
require([
21
    // Loading the libs
22
    'order',
23
    'text',
24
    'order!jquery',
25
    'order!xdomainajax',
26
    'order!underscore',
27
    'order!backbone'
28
]);
29
30
define([
31
// Load our app module and pass it to our definition function
32
    'app'
33
], function (App)
34
    {
35
        // The "app" dependency is passed in as "App"
36
        // Again, the other dependencies passed in are not "AMD" therefore don't pass a parameter to this function
37
        App.initialize();
38
    }
39
);