You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
477 B
JavaScript

define('main', [
'underscore',
'backbone',
'config',
'app'
], function main(_, Backbone, config, App) {
'use strict';
requirejs.config(config());
return function main(options) {
var opts = _.defaults({}, options, {config: {}});
var app = new App(opts);
app.on('start', function () {
if (!Backbone.history.start({pushState: true})) {
app.router.navigate('slide/1');
}
});
app.start(opts.config);
return app;
};
});