Tests refactoring
[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         },
11
12         map: {
13             '*':
14                 {
15                     'libs/jquery': '../../libs/jquery-1.9.1.min',
16                     'libs/underscore': '../../libs/underscore-min',
17                     'libs/bootstrap': '../../libs/bootstrap/js/bootstrap.min',
18                     'libs/backbone': '../../libs/backbone-min',
19
20                 }
21         },
22
23         shim: {
24             '../../libs/jquery-1.9.1.min': {
25                 exports: '$',
26             },
27             '../../libs/underscore-min': {
28                 exports: '_'
29             },
30             '../../libs/bootstrap/js/bootstrap.min': {
31                 deps: ['libs/jquery']
32             },
33             '../../libs/backbone-min': {
34                 exports: 'Backbone',
35                 deps: ['libs/jquery', 'libs/underscore']
36             }
37         }
38
39     });
40     
41     requirejs([
42         'libs/jquery',
43         '../fnpjs/runner',
44         'rng',
45         './modules',
46         'libs/bootstrap'
47     ], function($, runner, rng, modules) {
48         $(function() {
49             var app = new runner.Runner(rng, modules);
50             app.setBootstrappedData('data', RNG_BOOTSTRAP_DATA);
51             app.start({rootSelector:'#editor_root'});
52         });
53     });
54
55
56 })();