aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/dispatcher.js
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2016-02-29 02:57:35 +0100
committerMaximilian Hils <git@maximilianhils.com>2016-02-29 02:57:35 +0100
commit3de89ab16c320350f20c828763b11a47cf2a2807 (patch)
tree3ad523407ca1a2db6c2560ecab546c4a57c728c4 /web/src/js/dispatcher.js
parent9192427d7b845a6389c4a44c930e067c479cdf0d (diff)
downloadmitmproxy-3de89ab16c320350f20c828763b11a47cf2a2807.tar.gz
mitmproxy-3de89ab16c320350f20c828763b11a47cf2a2807.tar.bz2
mitmproxy-3de89ab16c320350f20c828763b11a47cf2a2807.zip
web: use es6 modules
Diffstat (limited to 'web/src/js/dispatcher.js')
-rw-r--r--web/src/js/dispatcher.js8
1 files changed, 2 insertions, 6 deletions
diff --git a/web/src/js/dispatcher.js b/web/src/js/dispatcher.js
index 0c2aa202..b4e22ed9 100644
--- a/web/src/js/dispatcher.js
+++ b/web/src/js/dispatcher.js
@@ -1,5 +1,5 @@
-var flux = require("flux");
+import flux from "flux";
const PayloadSources = {
VIEW: "view",
@@ -7,7 +7,7 @@ const PayloadSources = {
};
-var AppDispatcher = new flux.Dispatcher();
+export var AppDispatcher = new flux.Dispatcher();
AppDispatcher.dispatchViewAction = function (action) {
action.source = PayloadSources.VIEW;
this.dispatch(action);
@@ -15,8 +15,4 @@ AppDispatcher.dispatchViewAction = function (action) {
AppDispatcher.dispatchServerAction = function (action) {
action.source = PayloadSources.SERVER;
this.dispatch(action);
-};
-
-module.exports = {
- AppDispatcher: AppDispatcher
}; \ No newline at end of file