Move website to separate subdirectory

This commit is contained in:
Manuel Thalmann 2022-12-13 18:21:38 +01:00
parent d88e3a7ac8
commit ce72afb8ed
No known key found for this signature in database
GPG key ID: 5FD9AD3CCDDBD27B
23 changed files with 119 additions and 48 deletions

View file

@ -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
View file

@ -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
View file

@ -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"
}
} }
} }
} }

View file

@ -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"
} }
} }

View 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")
]
}
};

View file

@ -0,0 +1,6 @@
{
"extends": "./tsconfig.base.json",
"include": [
"./.eslintrc.cjs"
]
}

View 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"
}
}

View file

@ -0,0 +1,3 @@
{
"extends": "../../tsconfig.base.json"
}

View file

@ -0,0 +1,15 @@
{
"extends": "./tsconfig.base.json",
"references": [
{
"path": "./app.jsconfig.json"
},
{
"path": "./eslint.jsconfig.json"
},
{
"path": "./gulp.tsconfig.json"
}
],
"include": []
}

View file

@ -1,8 +1,6 @@
{ {
"extends": "@manuth/tsconfig/recommended", "extends": "@manuth/tsconfig/recommended",
"compilerOptions": { "compilerOptions": {
"module": "Node16", "module": "Node16"
"allowJs": true,
"checkJs": true
} }
} }

View file

@ -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": []