smartxml: fix wrapping root node
[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
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         'plugins/core/core',
50         'libs/bootstrap'
51     ], function($, runner, rng, modules, corePlugin) {
52         $(function() {
53             var app = new runner.Runner(rng, modules);
54             app.registerPlugin(corePlugin);
55
56             if(typeof editor_init !== 'undefined') {
57                 editor_init(app);
58             }
59         });
60     });
61
62
63 })();