load helper.js using requirejs

This commit is contained in:
Nils Schneider 2015-03-29 04:26:23 +02:00
parent 5a5c3e2263
commit 056c46331d
3 changed files with 5 additions and 6 deletions

8
app.js
View File

@ -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"])

View File

@ -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>

View File

@ -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)