wlxml: isContextRoot for the reminder of edumed exercises (fixup)
[fnpeditor.git] / src / editor / entrypoint.js
1 (function() {
2     'use strict';
3     
4     /* globals requirejs, editor_init */
5
6     requirejs.config({
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                     'libs/ace/ace': '../../libs/ace/ace'
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             '../../libs/ace/ace': {
41                 exports: 'ace'
42             },
43         }
44
45     });
46     
47     requirejs([
48         'libs/jquery',
49         '../fnpjs/runner',
50         'rng',
51         './modules',
52         'plugins/core/core',
53         'libs/bootstrap'
54     ], function($, runner, rng, modules, corePlugin) {
55         $(function() {
56             var app = new runner.Runner(rng, modules);
57             app.registerPlugin(corePlugin);
58
59             if(typeof editor_init !== 'undefined') {
60                 editor_init(app);
61             }
62         });
63     });
64
65
66 })();