From 4656aaa23c726af1812d91cb96fc7cd8e67c25a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Thu, 29 Nov 2018 13:15:24 +0100 Subject: [PATCH] socket.io in JS --- package.json | 5 +++-- src/game.coffee | 1 + static/game.html | 1 - 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 30907d9..31d9aaf 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,8 @@ "devDependencies": { "@babel/core": "^7.1.6", "@babel/preset-env": "^7.1.6", - "css-loader": "^1.0.1", "coffee-loader": "^0.9.0", + "css-loader": "^1.0.1", "postcss-loader": "^3.0.0", "sass-loader": "^7.1.0", "style-loader": "^0.23.1", @@ -41,6 +41,7 @@ "express": "^4.16.4", "helmet": "*", "mysql": "*", - "socket.io": "^2.1.1" + "socket.io": "^2.2.0", + "socket.io-client": "^2.2.0" } } diff --git a/src/game.coffee b/src/game.coffee index f1ac210..01c5461 100644 --- a/src/game.coffee +++ b/src/game.coffee @@ -5,6 +5,7 @@ window.$ = require('jquery') $ -> # libs requiring full DOM require 'craftyjs/dist/crafty' + io = require 'socket.io-client' # style sheet require './style/custom.scss' diff --git a/static/game.html b/static/game.html index 356c4b2..b9dccfe 100644 --- a/static/game.html +++ b/static/game.html @@ -2,7 +2,6 @@ Crafty Things -