Move website to separate subdirectory
This commit is contained in:
parent
d88e3a7ac8
commit
ce72afb8ed
23 changed files with 119 additions and 48 deletions
|
@ -2,19 +2,16 @@ const { join } = require("node:path");
|
||||||
const { PluginName, PresetName } = require("@manuth/eslint-plugin-typescript");
|
const { PluginName, PresetName } = require("@manuth/eslint-plugin-typescript");
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
root: true,
|
||||||
extends: [
|
extends: [
|
||||||
`plugin:${PluginName}/${PresetName.RecommendedWithTypeChecking}`
|
`plugin:${PluginName}/${PresetName.RecommendedWithTypeChecking}`
|
||||||
],
|
],
|
||||||
env: {
|
env: {
|
||||||
browser: true,
|
|
||||||
es6: true,
|
|
||||||
node: true
|
node: true
|
||||||
},
|
},
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
project: [
|
project: [
|
||||||
join(__dirname, "app.jsconfig.json"),
|
join(__dirname, "eslint.jsconfig.json")
|
||||||
join(__dirname, "eslint.jsconfig.json"),
|
|
||||||
join(__dirname, "gulp.tsconfig.json")
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
4
.vscode/launch.json
vendored
4
.vscode/launch.json
vendored
|
@ -9,10 +9,10 @@
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"name": "Launch Website in Chrome",
|
"name": "Launch Website in Chrome",
|
||||||
"url": "http://localhost:3000",
|
"url": "http://localhost:3000",
|
||||||
"webRoot": "${workspaceFolder}/lib/static",
|
"webRoot": "${workspaceFolder}/packages/game/lib/static",
|
||||||
"preLaunchTask": "Build",
|
"preLaunchTask": "Build",
|
||||||
"pathMapping": {
|
"pathMapping": {
|
||||||
"/": "${workspaceFolder}/src"
|
"/": "${workspaceFolder}/packages/game/src"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
40
package-lock.json
generated
40
package-lock.json
generated
|
@ -6,20 +6,14 @@
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "connect-force",
|
"name": "connect-force",
|
||||||
"version": "0.0.0",
|
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@manuth/eslint-plugin-typescript": "^4.0.1",
|
"@manuth/eslint-plugin-typescript": "^4.0.1",
|
||||||
"@manuth/tsconfig": "^3.0.2",
|
"eslint": "^8.29.0"
|
||||||
"@types/browser-sync": "^2.26.3",
|
},
|
||||||
"@types/gulp": "^4.0.10",
|
"workspaces": {
|
||||||
"@types/node": "^18.11.11",
|
"packages": [
|
||||||
"browser-sync": "^2.27.10",
|
"./packages/*"
|
||||||
"cross-env": "^7.0.3",
|
]
|
||||||
"eslint": "^8.29.0",
|
|
||||||
"gulp": "^4.0.2",
|
|
||||||
"rimraf": "^3.0.2",
|
|
||||||
"ts-node": "^10.9.1",
|
|
||||||
"upath": "^2.0.1"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/code-frame": {
|
"node_modules/@babel/code-frame": {
|
||||||
|
@ -2035,6 +2029,10 @@
|
||||||
"node": ">= 0.10.0"
|
"node": ">= 0.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/connect-force": {
|
||||||
|
"resolved": "packages/game",
|
||||||
|
"link": true
|
||||||
|
},
|
||||||
"node_modules/connect-history-api-fallback": {
|
"node_modules/connect-history-api-fallback": {
|
||||||
"version": "1.6.0",
|
"version": "1.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz",
|
||||||
|
@ -9065,6 +9063,24 @@
|
||||||
"funding": {
|
"funding": {
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"packages/game": {
|
||||||
|
"name": "connect-force",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"devDependencies": {
|
||||||
|
"@manuth/eslint-plugin-typescript": "^4.0.1",
|
||||||
|
"@manuth/tsconfig": "^3.0.2",
|
||||||
|
"@types/browser-sync": "^2.26.3",
|
||||||
|
"@types/gulp": "^4.0.10",
|
||||||
|
"@types/node": "^18.11.11",
|
||||||
|
"browser-sync": "^2.27.10",
|
||||||
|
"cross-env": "^7.0.3",
|
||||||
|
"eslint": "^8.29.0",
|
||||||
|
"gulp": "^4.0.2",
|
||||||
|
"rimraf": "^3.0.2",
|
||||||
|
"ts-node": "^10.9.1",
|
||||||
|
"upath": "^2.0.1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
38
package.json
38
package.json
|
@ -1,31 +1,25 @@
|
||||||
{
|
{
|
||||||
"name": "connect-force",
|
"name": "connect-force",
|
||||||
"version": "0.0.0",
|
"private": true,
|
||||||
"type": "module",
|
"files": [],
|
||||||
"description": "A selfmade Connect Four game.",
|
"workspaces": {
|
||||||
"author": "Manuel Thalmann <m@nuth.ch>",
|
"packages": [
|
||||||
|
"./packages/*"
|
||||||
|
]
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"gulp": "cross-env NODE_OPTIONS=\"--loader ts-node/esm\" gulp --",
|
"rebuild": "npm run --workspaces rebuild",
|
||||||
"build": "npm run gulp Build",
|
"watch": "npm run --workspaces watch",
|
||||||
"rebuild": "npm run clean && npm run build",
|
"clean": "npm run --workspaces clean",
|
||||||
"watch": "npm run gulp Watch",
|
"lint-local": "eslint --max-warnings 0 .eslintrc.cjs",
|
||||||
"clean": "rimraf ./lib",
|
"lint-local-ide": "npm run lint-local || exit 0",
|
||||||
"lint": "eslint --max-warnings 0 ./src .eslintrc.cjs",
|
"lint": "npm run lint-local && npm run --workspaces lint",
|
||||||
"lint-ide": "npm run lint || exit 0",
|
"lint-ide": "npm run lint-local-ide && npm run --workspaces lint-ide",
|
||||||
|
"test": "npm run --workspaces test",
|
||||||
"prepare": "npm run rebuild"
|
"prepare": "npm run rebuild"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@manuth/eslint-plugin-typescript": "^4.0.1",
|
"@manuth/eslint-plugin-typescript": "^4.0.1",
|
||||||
"@manuth/tsconfig": "^3.0.2",
|
"eslint": "^8.29.0"
|
||||||
"@types/browser-sync": "^2.26.3",
|
|
||||||
"@types/gulp": "^4.0.10",
|
|
||||||
"@types/node": "^18.11.11",
|
|
||||||
"browser-sync": "^2.27.10",
|
|
||||||
"cross-env": "^7.0.3",
|
|
||||||
"eslint": "^8.29.0",
|
|
||||||
"gulp": "^4.0.2",
|
|
||||||
"rimraf": "^3.0.2",
|
|
||||||
"ts-node": "^10.9.1",
|
|
||||||
"upath": "^2.0.1"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
14
packages/game/.eslintrc.cjs
Normal file
14
packages/game/.eslintrc.cjs
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
const { join } = require("node:path");
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
env: {
|
||||||
|
browser: true
|
||||||
|
},
|
||||||
|
parserOptions: {
|
||||||
|
project: [
|
||||||
|
join(__dirname, "app.jsconfig.json"),
|
||||||
|
join(__dirname, "eslint.jsconfig.json"),
|
||||||
|
join(__dirname, "gulp.tsconfig.json")
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
6
packages/game/eslint.jsconfig.json
Normal file
6
packages/game/eslint.jsconfig.json
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"extends": "./tsconfig.base.json",
|
||||||
|
"include": [
|
||||||
|
"./.eslintrc.cjs"
|
||||||
|
]
|
||||||
|
}
|
31
packages/game/package.json
Normal file
31
packages/game/package.json
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
{
|
||||||
|
"name": "connect-force",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"type": "module",
|
||||||
|
"description": "A selfmade Connect Four game.",
|
||||||
|
"author": "Manuel Thalmann <m@nuth.ch>",
|
||||||
|
"scripts": {
|
||||||
|
"gulp": "cross-env NODE_OPTIONS=\"--loader ts-node/esm\" gulp --",
|
||||||
|
"build": "npm run gulp Build",
|
||||||
|
"rebuild": "npm run clean && npm run build",
|
||||||
|
"watch": "npm run gulp Watch",
|
||||||
|
"clean": "rimraf ./lib",
|
||||||
|
"lint": "eslint --max-warnings 0 ./src .eslintrc.cjs",
|
||||||
|
"lint-ide": "npm run lint || exit 0",
|
||||||
|
"prepare": "npm run rebuild"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@manuth/eslint-plugin-typescript": "^4.0.1",
|
||||||
|
"@manuth/tsconfig": "^3.0.2",
|
||||||
|
"@types/browser-sync": "^2.26.3",
|
||||||
|
"@types/gulp": "^4.0.10",
|
||||||
|
"@types/node": "^18.11.11",
|
||||||
|
"browser-sync": "^2.27.10",
|
||||||
|
"cross-env": "^7.0.3",
|
||||||
|
"eslint": "^8.29.0",
|
||||||
|
"gulp": "^4.0.2",
|
||||||
|
"rimraf": "^3.0.2",
|
||||||
|
"ts-node": "^10.9.1",
|
||||||
|
"upath": "^2.0.1"
|
||||||
|
}
|
||||||
|
}
|
3
packages/game/tsconfig.base.json
Normal file
3
packages/game/tsconfig.base.json
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"extends": "../../tsconfig.base.json"
|
||||||
|
}
|
15
packages/game/tsconfig.json
Normal file
15
packages/game/tsconfig.json
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
"extends": "./tsconfig.base.json",
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"path": "./app.jsconfig.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "./eslint.jsconfig.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "./gulp.tsconfig.json"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"include": []
|
||||||
|
}
|
|
@ -1,8 +1,6 @@
|
||||||
{
|
{
|
||||||
"extends": "@manuth/tsconfig/recommended",
|
"extends": "@manuth/tsconfig/recommended",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"module": "Node16",
|
"module": "Node16"
|
||||||
"allowJs": true,
|
|
||||||
"checkJs": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,14 +1,11 @@
|
||||||
{
|
{
|
||||||
"extends": "./tsconfig.base.json",
|
"extends": "./tsconfig.base.json",
|
||||||
"references": [
|
"references": [
|
||||||
{
|
|
||||||
"path": "./app.jsconfig.json"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path": "./eslint.jsconfig.json"
|
"path": "./eslint.jsconfig.json"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "./gulp.tsconfig.json"
|
"path": "./packages/game"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"include": []
|
"include": []
|
||||||
|
|
Loading…
Reference in a new issue