diff options
author | Jakub Kozisek <jakub.kozisek@gmail.com> | 2011-11-26 03:39:37 +0100 |
---|---|---|
committer | Jakub Kozisek <jakub.kozisek@gmail.com> | 2011-11-26 03:39:37 +0100 |
commit | c0f76c58c7960918990e991d93ad27d9897d1d3d (patch) | |
tree | 70a83416547773cdb5791c1cadc384c88522ef95 /examples/modular-backbone-updated/js/main.js | |
parent | 90e0a441197efba5a4b72d4156f8a0bc4d4e0d1f (diff) | |
download | backbonetutorials-c0f76c58c7960918990e991d93ad27d9897d1d3d.zip backbonetutorials-c0f76c58c7960918990e991d93ad27d9897d1d3d.tar.gz backbonetutorials-c0f76c58c7960918990e991d93ad27d9897d1d3d.tar.bz2 |
moved the updated modular-backbone example into modular-backbone-updated,
modular-backbone now contains original version
Diffstat (limited to 'examples/modular-backbone-updated/js/main.js')
-rw-r--r-- | examples/modular-backbone-updated/js/main.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/examples/modular-backbone-updated/js/main.js b/examples/modular-backbone-updated/js/main.js new file mode 100644 index 0000000..c1196cc --- /dev/null +++ b/examples/modular-backbone-updated/js/main.js @@ -0,0 +1,28 @@ +// Author: Thomas Davis <thomasalwyndavis@gmail.com> +// Filename: main.js + +// Require.js allows us to configure shortcut alias +// Their usage will become more apparent futher along in the tutorial. +require.config({ + paths: { + jquery: 'libs/jquery/jquery-min', + underscore: 'libs/underscore/underscore-min', + backbone: 'libs/backbone/backbone-optamd3-min', + text: 'libs/require/text', + templates: '../templates' + } + +}); + +require([ + + // Load our app module and pass it to our definition function + 'app' + + // Some plugins have to be loaded in order due to their non AMD compliance + // Because these scripts are not "modules" they do not pass any values to the definition function below +], 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(); +}); |