Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* From my index.html
- <script data-main="js/main" src="js/libs/require/require.js"></script>
- */
- /* Main.js */
- require.config({
- paths:{
- jquery:'libs/jquery/jquery-1.7.2.min',
- underscore:'libs/underscore/underscore-min',
- backbone:'libs/backbone/backbone-min',
- text:'libs/require/text',
- order:'libs/require/order',
- xdomainajax:'libs/jquery/jquery.xdomainajax'
- //templates: '../templates'
- }
- });
- //Loading up the required library dependencies and the app.
- require([
- // Loading the libs
- 'order',
- 'text',
- 'order!jquery',
- 'order!xdomainajax',
- 'order!underscore',
- 'order!backbone'
- ]);
- define([
- // Load our app module and pass it to our definition function
- 'app'
- ], function (App)
- {
- // The "app" dependency is passed in as "App"
- // Again, the other dependencies passed in are not "AMD" therefore don't pass a parameter to this function
- App.initialize();
- }
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement