1
0
Fork 0
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:
Starbeamrainbowlabs 2017-11-09 21:35:56 +00:00
parent 9ce8f70be0
commit d9ce6387a3
6 changed files with 11 additions and 12 deletions

View file

@ -1,9 +1,9 @@
"use strict"; "use strict";
// npm modules // npm modules
window.EventEmitter = require("event-emitter-es6"); import EventEmitter from "event-emitter-es6";
window.FaviconNotification = require("favicon-notification"); import FaviconNotification from "favicon-notification";
window.panzoom = require("pan-zoom"); import panzoom from "pan-zoom";
// Our files // Our files
import RippleLink from './RippleLink'; import RippleLink from './RippleLink';
@ -140,7 +140,7 @@ class BoardWindow extends EventEmitter
FaviconNotification.add(); FaviconNotification.add();
// Setup the input controls // Setup the input controls
window.panzoom(canvas, this.handleCanvasMovement.bind(this)); panzoom(canvas, this.handleCanvasMovement.bind(this));
// --~~~-- // --~~~--

View file

@ -1,6 +1,6 @@
"use strict"; "use strict";
window.EventEmitter = require("event-emitter-es6"); import EventEmitter from "event-emitter-es6";
import OtherClient from './OtherClient'; import OtherClient from './OtherClient';
import Vector from './Utilities/Vector'; import Vector from './Utilities/Vector';

View file

@ -1,6 +1,6 @@
"use strict"; "use strict";
window.EventEmitter = require("event-emitter-es6"); import EventEmitter from "event-emitter-es6";
import BrushIndicator from './BrushIndicator.js'; import BrushIndicator from './BrushIndicator.js';

View file

@ -1,12 +1,11 @@
"use strict"; "use strict";
import cuid from "cuid";
import { simplify_line } from "visvalingam-simplifier";
import Vector from './Utilities/Vector'; import Vector from './Utilities/Vector';
import Mouse from './Utilities/Mouse'; import Mouse from './Utilities/Mouse';
var cuid = require("cuid");
var simplify_line = require("visvalingam-simplifier").simplify_line;
class Pencil class Pencil
{ {
/** /**

View file

@ -2,7 +2,7 @@
import { WebSocketStates, ReverseWebSocketStates } from './Utilities/WebSocketStates'; import { WebSocketStates, ReverseWebSocketStates } from './Utilities/WebSocketStates';
const EventEmitter = require("event-emitter-es6"); import EventEmitter from "event-emitter-es6";
class RippleLink extends EventEmitter class RippleLink extends EventEmitter
{ {

View file

@ -1,6 +1,6 @@
"use strict"; "use strict";
window.FpsIndicator = require("fps-indicator"); import FpsIndicator from "fps-indicator";
import BoardWindow from './BoardWindow'; import BoardWindow from './BoardWindow';