Nikolay Suslov 4 years ago
parent
commit
ccec6be00d
3 changed files with 15 additions and 7 deletions
  1. 0 1
      public/core/app.js
  2. 1 1
      public/index.html
  3. 14 5
      public/index.js

+ 0 - 1
public/core/app.js

@@ -1524,7 +1524,6 @@ class App {
 
     return loadjs([
       '/lib/async.min.js',
-      '/lib/ohm/ohm.min.js',
       '/lib/qheap.js',
       '/lib/lively.vm_standalone.js',
       '/lib/crypto.js',

+ 1 - 1
public/index.html

@@ -15,7 +15,7 @@ Copyright (c) 2014-2020 Nikolai Suslov and the Krestianstvo.org project contribu
     <base href="/">
     <script type="text/javascript" src="/lib/loadjs.min.js"></script>
     <script type="text/javascript" src="index.js"></script>
-
+    
     <!-- TODO: move goog.closure to VWF model and import as ES module -->
     <script type="text/javascript" src="/drivers/model/math/closure/base.js"></script>
     <script type="text/javascript" src="/drivers/model/math/goog.closure.js"></script>

+ 14 - 5
public/index.js

@@ -1,14 +1,19 @@
 //Load all required JS libs
 
 loadjs([
-    '/index.css',
-    '/lib/socket.io.js',
-    '/lib/he.js',
     '/lib/ui/noty/noty.css',
     '/lib/ui/noty/themes/mint.css',
     '/lib/ui/noty/noty.js',
     '/lib/ui/nprogress/nprogress.css',
     '/lib/ui/nprogress/nprogress.js',
+],'sys', {
+    async: false
+});
+
+loadjs([
+    '/index.css',
+    '/lib/socket.io.js',
+    '/lib/he.js',
     '/lib/locale/polyglot.min.js',
     '/lib/hashids.min.js',
 ],'forall', {
@@ -16,6 +21,7 @@ loadjs([
 });
 
 loadjs([
+    '/lib/ohm/ohm.min.js',
     '/lib/fun/@most/prelude/dist/index.js',
     '/lib/fun/@most/scheduler/dist/index.js',
     '/lib/fun/@most/disposable/dist/index.js',
@@ -51,11 +57,14 @@ loadjs(['/lib/gundb/gun.min.js',
 );
 
 
-loadjs.ready(['fun', 'forall'], function() {
-    NProgress.start();
+loadjs.ready(['sys', 'fun', 'forall'], function() {
     }).ready('gundb', function() {
         import('/core/app.js')
             .then((module) => {
                 new module.App
         });
 })
+
+document.addEventListener('DOMContentLoaded', function(){
+    NProgress.start();
+})