summaryrefslogtreecommitdiffstats
path: root/examples/todo-app/js/main.js
diff options
context:
space:
mode:
authorRyan Kirkman <ryan@ryankirkman.com>2011-12-09 22:30:45 +1000
committerRyan Kirkman <ryan@ryankirkman.com>2011-12-09 22:30:45 +1000
commit25148749437cbd1aad53aab1cb340013b9008ded (patch)
tree1a1fee11f6ceaaed2ffebe58f81c6c03d1b31d71 /examples/todo-app/js/main.js
parenta6e89a608ee360161be96cc6ad3e13ef672c0e76 (diff)
downloadbackbonetutorials-25148749437cbd1aad53aab1cb340013b9008ded.zip
backbonetutorials-25148749437cbd1aad53aab1cb340013b9008ded.tar.gz
backbonetutorials-25148749437cbd1aad53aab1cb340013b9008ded.tar.bz2
Made a requirejs example for Addy Osmani
Diffstat (limited to 'examples/todo-app/js/main.js')
-rw-r--r--examples/todo-app/js/main.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/examples/todo-app/js/main.js b/examples/todo-app/js/main.js
new file mode 100644
index 0000000..4c798e4
--- /dev/null
+++ b/examples/todo-app/js/main.js
@@ -0,0 +1,18 @@
+// 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'
+ }
+
+});
+
+require(['views/app'], function(AppView){
+ var app_view = new AppView;
+});