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