mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-16 15:45:13 +00:00
50 lines
934 B
JavaScript
Executable File
50 lines
934 B
JavaScript
Executable File
define([
|
|
'jQuery',
|
|
'utils/storage',
|
|
'utils/sharing',
|
|
'utils/dropdown',
|
|
|
|
'core/events',
|
|
'core/state',
|
|
'core/keyboard',
|
|
'core/navigation',
|
|
'core/progress',
|
|
'core/sidebar',
|
|
'core/search',
|
|
|
|
'apis/toolbar'
|
|
], function($, storage, sharing, dropdown, events, state,
|
|
keyboard, navigation, progress, sidebar, search, toolbar){
|
|
var start = function(config) {
|
|
// Init sidebar
|
|
sidebar.init();
|
|
|
|
// Load search
|
|
search.init();
|
|
|
|
// Init keyboard
|
|
keyboard.init();
|
|
|
|
// Bind sharing button
|
|
sharing.init();
|
|
|
|
// Bind dropdown
|
|
dropdown.init();
|
|
|
|
// Init navigation
|
|
navigation.init();
|
|
|
|
events.trigger('start', config);
|
|
};
|
|
|
|
// Export APIs for plugins
|
|
return {
|
|
start: start,
|
|
events: events,
|
|
state: state,
|
|
|
|
toolbar: toolbar,
|
|
storage: storage
|
|
};
|
|
});
|