]> git.r.bdr.sh - rbdr/sorting-hat-renderer/blobdiff - lib/sorting_hat.js
Merge branch 'release/1.0.0'
[rbdr/sorting-hat-renderer] / lib / sorting_hat.js
diff --git a/lib/sorting_hat.js b/lib/sorting_hat.js
new file mode 100644 (file)
index 0000000..2568b75
--- /dev/null
@@ -0,0 +1,37 @@
+import Vue from 'vue';
+
+import WaveRendererComponent from './components/wave_renderer';
+import StatusComponent from './components/status';
+
+/* global window */
+
+const internals = {};
+
+/**
+ * The main vue application, it is composed by the other components, no real
+ * logic otherwise
+ *
+ * @class SortingHat
+ */
+internals.SortingHat = {
+
+  start() {
+
+    this.vm = new Vue({
+      el: '#sorting-hat',
+      components: {
+        waveRenderer: WaveRendererComponent,
+        status: StatusComponent
+      }
+    });
+  }
+};
+
+// Instantiates the app
+
+internals.run = function () {
+
+  internals.SortingHat.start();
+};
+
+window.addEventListener('load', internals.run);