mirror of
https://github.com/sbrl/Nibriboard.git
synced 2018-01-10 21:33:49 +00:00
[client] Rewrite to use es6 import everywhere for npm modules
This commit is contained in:
parent
9ce8f70be0
commit
d9ce6387a3
6 changed files with 11 additions and 12 deletions
|
@ -1,9 +1,9 @@
|
|||
"use strict";
|
||||
|
||||
// npm modules
|
||||
window.EventEmitter = require("event-emitter-es6");
|
||||
window.FaviconNotification = require("favicon-notification");
|
||||
window.panzoom = require("pan-zoom");
|
||||
import EventEmitter from "event-emitter-es6";
|
||||
import FaviconNotification from "favicon-notification";
|
||||
import panzoom from "pan-zoom";
|
||||
|
||||
// Our files
|
||||
import RippleLink from './RippleLink';
|
||||
|
@ -140,7 +140,7 @@ class BoardWindow extends EventEmitter
|
|||
FaviconNotification.add();
|
||||
|
||||
// Setup the input controls
|
||||
window.panzoom(canvas, this.handleCanvasMovement.bind(this));
|
||||
panzoom(canvas, this.handleCanvasMovement.bind(this));
|
||||
|
||||
// --~~~--
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
"use strict";
|
||||
|
||||
window.EventEmitter = require("event-emitter-es6");
|
||||
import EventEmitter from "event-emitter-es6";
|
||||
|
||||
import OtherClient from './OtherClient';
|
||||
import Vector from './Utilities/Vector';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
"use strict";
|
||||
|
||||
window.EventEmitter = require("event-emitter-es6");
|
||||
import EventEmitter from "event-emitter-es6";
|
||||
|
||||
import BrushIndicator from './BrushIndicator.js';
|
||||
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
"use strict";
|
||||
|
||||
import cuid from "cuid";
|
||||
import { simplify_line } from "visvalingam-simplifier";
|
||||
|
||||
import Vector from './Utilities/Vector';
|
||||
|
||||
import Mouse from './Utilities/Mouse';
|
||||
|
||||
var cuid = require("cuid");
|
||||
var simplify_line = require("visvalingam-simplifier").simplify_line;
|
||||
|
||||
class Pencil
|
||||
{
|
||||
/**
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import { WebSocketStates, ReverseWebSocketStates } from './Utilities/WebSocketStates';
|
||||
|
||||
const EventEmitter = require("event-emitter-es6");
|
||||
import EventEmitter from "event-emitter-es6";
|
||||
|
||||
class RippleLink extends EventEmitter
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
"use strict";
|
||||
|
||||
window.FpsIndicator = require("fps-indicator");
|
||||
import FpsIndicator from "fps-indicator";
|
||||
|
||||
import BoardWindow from './BoardWindow';
|
||||
|
||||
|
|
Loading…
Reference in a new issue