work on initialization

This commit is contained in:
Géry Debongnie
2019-02-18 15:34:23 +01:00
parent 7c54787c32
commit 3446c5b504
20 changed files with 220 additions and 194 deletions
+12 -2
View File
@@ -1,6 +1,9 @@
///<amd-module name="main" />
import { init } from "./init";
import { makeEnv } from "./env";
import { rpc } from "./services/ajax";
import { loadMenus } from "./loaders/menus";
import { loadTemplates } from "./loaders/templates";
import { Root } from "./widgets/root";
//------------------------------------------------------------------------------
@@ -8,7 +11,14 @@ import { Root } from "./widgets/root";
//------------------------------------------------------------------------------
document.addEventListener("DOMContentLoaded", async function() {
const { env, menuInfo } = await init();
const services = {
rpc
};
const loaders = {
loadTemplates
};
const env = await makeEnv(loaders, services);
const menuInfo = loadMenus();
// Creating root widget
const rootWidget = new Root(env, { menuInfo });