Merge branch 'master' into Share-players-position-using-Socket.IO

# Conflicts:
#	back/src/Controller/IoSocketController.ts
This commit is contained in:
gparant 2020-04-04 22:46:42 +02:00
commit 5bfedb04fd
9 changed files with 732 additions and 16 deletions

View File

@ -0,0 +1,63 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
name: "Continuous Integration"
on:
- "pull_request"
- "push"
jobs:
continuous-integration-front:
name: "Continuous Integration Front"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v2.0.0"
- name: "Setup NodeJS"
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: "Install dependencies"
run: yarn install
working-directory: "front"
- name: "Build"
run: yarn run build
env:
API_URL: "http://localhost:8080"
working-directory: "front"
- name: "Lint"
run: yarn run lint
working-directory: "front"
continuous-integration-back:
name: "Continuous Integration Back"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v2.0.0"
- name: "Setup NodeJS"
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: "Install dependencies"
run: yarn install
working-directory: "back"
- name: "Build"
run: yarn run tsc
working-directory: "back"
- name: "Lint"
run: yarn run lint
working-directory: "back"

View File

@ -1,3 +1,5 @@
![](https://github.com/thecodingmachine/workadventure/workflows/Continuous%20Integration/badge.svg)
# Work Adventure
## Work in progress

View File

@ -11,7 +11,7 @@ export class IoSocketController{
constructor(server : http.Server) {
this.Io = socketIO(server);
//authentication with token. it will be decodes and stock in socket.
// Authentication with token. it will be decoded and stored in the socket.
this.Io.use( (socket: Socket, next) => {
if (!socket.handshake.query || !socket.handshake.query.token) {
return next(new Error('Authentication error'));
@ -136,4 +136,4 @@ export class IoSocketController{
this.shareUsersPosition();
}, 10);
}
}
}

27
front/.eslintrc.json Normal file
View File

@ -0,0 +1,27 @@
{
"root": true,
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"no-unused-vars": "off"
}
}

BIN
front/dist/resources/logos/tcm_full.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 B

BIN
front/dist/resources/logos/tcm_short.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 B

View File

@ -4,6 +4,9 @@
"main": "index.js",
"license": "AGPL",
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^2.26.0",
"@typescript-eslint/parser": "^2.26.0",
"eslint": "^6.8.0",
"ts-loader": "^6.2.2",
"typescript": "^3.8.3",
"webpack": "^4.42.1",
@ -15,6 +18,7 @@
},
"scripts": {
"start": "webpack-dev-server --open",
"build": "webpack"
"build": "webpack",
"lint": "node_modules/.bin/eslint src/ . --ext .ts"
}
}

View File

@ -17,4 +17,4 @@ let game = new Phaser.Game(config);
window.addEventListener('resize', function (event) {
game.scale.resize(window.innerWidth / resolution, window.innerHeight / resolution);
}
});

File diff suppressed because it is too large Load Diff