Add lerna
This commit is contained in:
parent
d40c538ac5
commit
51a8e2a629
23 changed files with 137 additions and 214 deletions
|
|
@ -1 +0,0 @@
|
|||
**/*.js
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
{
|
||||
"root": true,
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es2020": true
|
||||
},
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/eslint-recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"prettier",
|
||||
"prettier/@typescript-eslint"
|
||||
],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 11,
|
||||
"sourceType": "module"
|
||||
},
|
||||
"plugins": ["unused-imports", "@typescript-eslint", "prettier"],
|
||||
"rules": {
|
||||
"prettier/prettier": "error",
|
||||
"no-unused-vars": "off",
|
||||
"unused-imports/no-unused-imports-ts": "error",
|
||||
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/explicit-module-boundary-types": "off",
|
||||
"@typescript-eslint/no-non-null-assertion": "off"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"trailingComma": "es5",
|
||||
"printWidth": 90,
|
||||
"tabWidth": 2,
|
||||
"singleQuote": true,
|
||||
"endOfLine": "lf"
|
||||
}
|
||||
|
|
@ -1,52 +1,33 @@
|
|||
{
|
||||
"name": "decla.red-server",
|
||||
"version": "0.0.0",
|
||||
"description": "Game server for decla.red",
|
||||
"private": true,
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"start": "concurrently --kill-others \"webpack --mode development -w\" \"npx nodemon dist/main.js\"",
|
||||
"lint": "npx eslint --fix \"src/**/*.ts\" && npx prettier --write \"src/**/*.ts\"",
|
||||
"start": "concurrently --kill-others \"webpack --mode development -w\" \"nodemon --legacy-watch dist/main.js\"",
|
||||
"lint": "eslint --fix \"src/**/*.ts\" && prettier --write \"src/**/*.ts\"",
|
||||
"build": "webpack --mode production"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "András Schmelczer <andras@schmelczer.dev> (https://schmelczer.dev/)",
|
||||
"devDependencies": {
|
||||
"@types/express": "^4.17.8",
|
||||
"@types/gl-matrix": "^2.4.5",
|
||||
"@types/node": "^14.11.2",
|
||||
"@typescript-eslint/eslint-plugin": "^3.9.1",
|
||||
"@typescript-eslint/parser": "^3.9.1",
|
||||
"clean-webpack-plugin": "^3.0.0",
|
||||
"concurrently": "^5.3.0",
|
||||
"eslint": "^7.2.0",
|
||||
"eslint-config-prettier": "^6.11.0",
|
||||
"eslint-plugin-import": "^2.21.2",
|
||||
"eslint-plugin-prettier": "^3.1.4",
|
||||
"eslint-plugin-unused-imports": "^0.1.3",
|
||||
"firebase": "^7.22.0",
|
||||
"gl-matrix": "^3.3.0",
|
||||
"nodemon": "^2.0.4",
|
||||
"prettier": "^2.0.5",
|
||||
"terser-webpack-plugin": "^2.3.5",
|
||||
"ts-loader": "^8.0.1",
|
||||
"typescript": "^3.8.3",
|
||||
"@types/uuid": "^8.0.0",
|
||||
"uuid": "^8.2.0",
|
||||
"concurrently": "^5.3.0",
|
||||
"webpack": "^4.43.0",
|
||||
"webpack-cli": "^3.3.11",
|
||||
"terser-webpack-plugin": "^2.3.5",
|
||||
"webpack-dev-server": "^3.10.3",
|
||||
"file-loader": "^6.1.0",
|
||||
"@types/cors": "^2.8.7",
|
||||
"@types/socket.io": "^2.1.11",
|
||||
"webpack-node-externals": "^2.5.2",
|
||||
"shared": "file:../shared"
|
||||
"clean-webpack-plugin": "^3.0.0",
|
||||
"raw-loader": "^4.0.1",
|
||||
"resolve-url-loader": "^3.1.1",
|
||||
"ts-loader": "^8.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"cors": "^2.8.5",
|
||||
"express": "^4.17.1",
|
||||
"http": "0.0.1-security",
|
||||
"socket.io": "^2.3.0",
|
||||
"uws": "^10.148.1"
|
||||
"uws": "^10.148.1",
|
||||
"webpack-node-externals": "^2.5.2"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,29 +1,31 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<script
|
||||
src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.3.1/socket.io.js"
|
||||
integrity="sha512-AcZyhRP/tbAEsXCCGlziPun5iFvcSUpEz2jKkx0blkYKbxU81F+iq8FURwPn1sYFeksJ+sDDrI5XujsqSobWdQ=="
|
||||
crossorigin="anonymous"
|
||||
></script>
|
||||
<title>Server info</title>
|
||||
</head>
|
||||
<body></body>
|
||||
<script>
|
||||
const socket = io({
|
||||
transports: ['websocket'],
|
||||
});
|
||||
|
||||
socket.on('reconnect_attempt', () => {
|
||||
socket.io.opts.transports = ['polling', 'websocket'];
|
||||
});
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.3.1/socket.io.js"
|
||||
integrity="sha512-AcZyhRP/tbAEsXCCGlziPun5iFvcSUpEz2jKkx0blkYKbxU81F+iq8FURwPn1sYFeksJ+sDDrI5XujsqSobWdQ=="
|
||||
crossorigin="anonymous"></script>
|
||||
<title>Server info</title>
|
||||
|
||||
socket.emit('join', 'insights');
|
||||
</head>
|
||||
|
||||
socket.on('insights', (message) => {
|
||||
document.body.innerText += message;
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
<body></body>
|
||||
<script>
|
||||
const socket = io({
|
||||
transports: ['websocket'],
|
||||
});
|
||||
|
||||
socket.on('reconnect_attempt', () => {
|
||||
socket.io.opts.transports = ['polling', 'websocket'];
|
||||
});
|
||||
|
||||
socket.emit('join', 'insights');
|
||||
|
||||
socket.on('insights', (message) => {
|
||||
document.body.innerText += message;
|
||||
});
|
||||
</script>
|
||||
|
||||
</html>
|
||||
|
|
@ -71,7 +71,6 @@ export class PhysicalContainer {
|
|||
|
||||
private createGroupForCommand(commandType: string) {
|
||||
const objectsReactingToCommand = [];
|
||||
console.log(commandType);
|
||||
this.objects.forEach((o, _) => {
|
||||
if (o.reactsToCommand(commandType)) {
|
||||
objectsReactingToCommand.push(o);
|
||||
|
|
|
|||
|
|
@ -23,8 +23,7 @@ module.exports = {
|
|||
},
|
||||
devtool: 'source-map',
|
||||
watchOptions: {
|
||||
aggregateTimeout: 600,
|
||||
ignored: /node_modules/,
|
||||
poll: true
|
||||
},
|
||||
optimization: {
|
||||
minimize: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue