Browse Source

load helper.js using requirejs

Nils Schneider 9 years ago
parent
commit
056c46331d
3 changed files with 5 additions and 6 deletions
  1. 4 4
      app.js
  2. 0 1
      index.html
  3. 1 1
      lib/main.js

+ 4 - 4
app.js

@@ -6,15 +6,15 @@ require.config({
     "chroma-js": "../bower_components/chroma-js/chroma.min",
     "moment": "../bower_components/moment/min/moment-with-locales.min",
     "tablesort": "../bower_components/tablesort/tablesort.min",
-    "tablesort.numeric": "../bower_components/tablesort/src/sorts/tablesort.numeric"
+    "tablesort.numeric": "../bower_components/tablesort/src/sorts/tablesort.numeric",
+    "helper": "../helper"
   },
   shim: {
     "leaflet.label": ["leaflet"],
     "tablesort": {
       exports: "Tablesort"
     },
-    "tablesort.numeric": ["tablesort"]
+    "tablesort.numeric": ["tablesort"],
+    "helper": []
   }
 })
-
-require(["main"])

+ 0 - 1
index.html

@@ -10,7 +10,6 @@
     <link rel="stylesheet" href="style.css">
     <script src="bower_components/es6-shim/es6-shim.min.js"></script>
     <script src="bower_components/intl/Intl.complete.js"></script>
-    <script src="helper.js"></script>
     <script src="bower_components/requirejs/require.js" data-main="app"></script>
   </head>
   <body>

+ 1 - 1
lib/main.js

@@ -1,4 +1,4 @@
-require(["config", "moment", "chroma-js", "router", "map", "sidebar", "tabs", "container", "meshstats", "linklist", "nodelist", "simplenodelist", "infobox/main"],
+require(["config", "moment", "chroma-js", "router", "map", "sidebar", "tabs", "container", "meshstats", "linklist", "nodelist", "simplenodelist", "infobox/main", "helper"],
 function (Config, moment, chroma, Router, Map, Sidebar, Tabs, Container, Meshstats, Linklist, Nodelist, SimpleNodelist, Infobox) {
   main(Config)