251151eea8b5994cd07697be4ec7b30c874072b7
[fnpeditor.git] / entrypoint.js
1 (function() {
2     'use strict';
3     
4     requirejs.config({
5         baseUrl: '/static/editor',
6         
7         map: {
8             '*':
9                 {
10                     'libs/jquery': 'libs/jquery-1.9.1.min',
11                     'libs/underscore': 'libs/underscore-min',
12                     'libs/bootstrap': 'libs/bootstrap/js/bootstrap.min',
13                     'libs/backbone': 'libs/backbone-min'
14                 }
15         },
16
17         shim: {
18             'libs/jquery-1.9.1.min': {
19                 exports: '$',
20             },
21             'libs/underscore-min': {
22                 exports: '_'
23             },
24             'libs/bootstrap/js/bootstrap.min': {
25                 deps: ['libs/jquery']
26             },
27             'libs/backbone-min': {
28                 exports: 'Backbone',
29                 deps: ['libs/jquery', 'libs/underscore']
30             }
31         }
32
33     });
34     
35     requirejs([
36         'libs/jquery',
37         'fnpjs/runner',
38         'rng',
39         './modules',
40         'libs/bootstrap'
41     ], function($, runner, rng, modules) {
42         $(function() {
43             var app = new runner.Runner(rng, modules);
44             app.setBootstrappedData('data', RNG_BOOTSTRAP_DATA);
45             app.start({rootSelector:'#editor_root'});
46         });
47     });
48
49
50 })();