fix problem with delete
[fnpeditor.git] / src / editor / entrypoint.js
1 (function() {
2     'use strict';
3     
4     /* globals requirejs, editor_init */
5
6     requirejs.config({
7         urlArgs: "bust=" + (new Date()).getTime(),
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                     'libs/ace/ace': '../../libs/ace/ace'
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             '../../libs/ace/ace': {
43                 exports: 'ace'
44             },
45         }
46
47     });
48     
49     requirejs([
50         'libs/jquery',
51         '../fnpjs/runner',
52         'rng',
53         './modules',
54         'plugins/core/core',
55         'libs/bootstrap'
56     ], function($, runner, rng, modules, corePlugin) {
57         $(function() {
58             var app = new runner.Runner(rng, modules);
59             app.registerPlugin(corePlugin);
60
61             if(typeof editor_init !== 'undefined') {
62                 editor_init(app);
63             }
64         });
65     });
66
67
68 })();