1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-07-19 05:09:41 +02:00
codex.docs/src/frontend/js/app.js
Peter Savchenko e7e64cea3e
Integrate CodeXEditor: dynamic import added (#5)
* Main elements created

* Add Editor to the writing page
2018-09-19 01:47:32 +03:00

43 lines
818 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';
/**
* Main app class
*/
class Docs {
/**
* @constructor
*/
constructor() {
console.log('CodeX Docs initialized');
this.writing = new Writing();
document.addEventListener('DOMContentLoaded', (event) => {
this.docReady();
});
}
/**
* Document is ready
*/
docReady() {
this.moduleDispatcher = new ModuleDispatcher({
Library: window.Docs
});
}
}
module.exports = new Docs();