wip: lists + uri extensions
[fnpeditor.git] / src / editor / entrypoint.js
1 (function() {
2     'use strict';
3     
4     /* globals requirejs, RNG_BOOTSTRAP_DATA */
5
6     requirejs.config({
7         baseUrl: '/static/editor/src/editor',
8         
9         paths: {
10             'fnpjs': '../fnpjs',
11             'libs': '../../libs',
12             'smartxml': '../smartxml',
13             'wlxml': '../wlxml',
14
15         },
16
17         map: {
18             '*':
19                 {
20                     'libs/jquery': '../../libs/jquery-1.9.1.min',
21                     'libs/underscore': '../../libs/underscore-min',
22                     'libs/bootstrap': '../../libs/bootstrap/js/bootstrap.min',
23                     'libs/backbone': '../../libs/backbone-min',
24
25                 }
26         },
27
28         shim: {
29             '../../libs/jquery-1.9.1.min': {
30                 exports: '$',
31             },
32             '../../libs/underscore-min': {
33                 exports: '_'
34             },
35             '../../libs/bootstrap/js/bootstrap.min': {
36                 deps: ['libs/jquery']
37             },
38             '../../libs/backbone-min': {
39                 exports: 'Backbone',
40                 deps: ['libs/jquery', 'libs/underscore']
41             }
42         }
43
44     });
45     
46     requirejs([
47         'libs/jquery',
48         '../fnpjs/runner',
49         'rng',
50         './modules',
51         'libs/bootstrap'
52     ], function($, runner, rng, modules) {
53         $(function() {
54             var app = new runner.Runner(rng, modules);
55             app.setBootstrappedData('data', RNG_BOOTSTRAP_DATA);
56             app.start({rootSelector:'#editor_root'});
57         });
58     });
59
60
61 })();