mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-07-19 05:09:41 +02:00
* Added misprints * Rebuilt bundle in prod mode * Added config from .codexdocsrc * Updated .sample
48 lines
967 B
JavaScript
48 lines
967 B
JavaScript
// No inspection for unused var `css` because it's used for css bundle
|
|
// eslint-disable-next-line no-unused-vars
|
|
import css from '../styles/main.pcss';
|
|
|
|
/**
|
|
* Module Dispatcher
|
|
* @see {@link https://github.com/codex-team/moduleDispatcher}
|
|
* @author CodeX
|
|
*/
|
|
import ModuleDispatcher from 'module-dispatcher';
|
|
|
|
/**
|
|
* Import modules
|
|
*/
|
|
import Writing from './modules/writing';
|
|
import Page from './modules/page';
|
|
import Extensions from './modules/extensions';
|
|
|
|
/**
|
|
* Main app class
|
|
*/
|
|
class Docs {
|
|
/**
|
|
* @constructor
|
|
*/
|
|
constructor() {
|
|
this.writing = new Writing();
|
|
this.page = new Page();
|
|
this.extensions = new Extensions();
|
|
|
|
document.addEventListener('DOMContentLoaded', (event) => {
|
|
this.docReady();
|
|
});
|
|
|
|
console.log('CodeX Docs initialized');
|
|
}
|
|
|
|
/**
|
|
* Document is ready
|
|
*/
|
|
docReady() {
|
|
this.moduleDispatcher = new ModuleDispatcher({
|
|
Library: window.Docs
|
|
});
|
|
}
|
|
}
|
|
|
|
export default new Docs();
|