wlxml: Use smartxml hook for XML normalization
[fnpeditor.git] / src / editor / entrypoint.js
1 (function() {
2     'use strict';
3     
4     /* globals requirejs, editor_init */
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         'plugins/core/core',
52         'libs/bootstrap'
53     ], function($, runner, rng, modules, corePlugin) {
54         $(function() {
55             var app = new runner.Runner(rng, modules);
56             app.registerPlugin(corePlugin);
57
58             if(typeof editor_init !== 'undefined') {
59                 editor_init(app);
60             }
61         });
62     });
63
64
65 })();