... |
... |
@@ -1,18 +1,22 @@ |
1 |
1 |
requirejs.config({ |
2 |
|
- baseUrl: '${xwiki.getDocument("TodoLists.TodoListMacro").getURL("download")}/', |
3 |
|
- paths: { |
4 |
|
- 'jquery': 'https://code.jquery.com/jquery-1.10.2.min' |
5 |
|
- }, |
6 |
|
- shim: { |
7 |
|
- 'ember-data': { |
8 |
|
- deps: ['ember', 'jquery'] |
|
2 |
+ //By default load any module IDs from js/lib |
|
3 |
+ baseUrl: '${xwiki.getDocument("TodoLists.TodoListMacro").getURL("download")}/', |
|
4 |
+ //except, if the module ID starts with "app", |
|
5 |
+ //load it from the js/app directory. paths |
|
6 |
+ //config is relative to the baseUrl, and |
|
7 |
+ //never includes a ".js" extension since |
|
8 |
+ //the paths config could be for a directory. |
|
9 |
+ paths: { |
9 |
9 |
}, |
10 |
|
- 'ember': { |
11 |
|
- deps: ['jquery'] |
|
11 |
+ shim: { |
|
12 |
+ 'ember-data': { |
|
13 |
+ deps: ['ember', 'jquery'] |
|
14 |
+ }, |
|
15 |
+ 'ember': { |
|
16 |
+ deps: ['jquery'] |
|
17 |
+ } |
12 |
12 |
} |
13 |
|
- } |
14 |
14 |
}); |
15 |
|
- |
16 |
16 |
require(['jquery', 'handlebars-v1.2.1', 'ember-data', 'ember' ], function ($) { |
17 |
17 |
|
18 |
18 |
// create app |