From e34ae6d1c39a21cf4e0f2bbcc8154ae35b9383fb Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Thu, 15 Dec 2022 00:57:54 +0100 Subject: [PATCH] Roll back to single workspace environment --- .eslintrc.cjs | 7 +- ConnectForce.code-workspace | 15 +- .../app.jsconfig.json => app.jsconfig.json | 0 .../gulp.tsconfig.json => gulp.tsconfig.json | 0 {packages/game/gulp => gulp}/Context.ts | 0 packages/game/gulpfile.ts => gulpfile.ts | 0 package.json | 39 ++-- packages/game/.eslintrc.cjs | 14 -- packages/game/.npmignore | 168 ------------------ packages/game/eslint.jsconfig.json | 10 -- packages/game/package.json | 31 ---- packages/game/tsconfig.base.json | 3 - packages/game/tsconfig.json | 15 -- {packages/game/src => src}/index.html | 0 {packages/game/src => src}/js/Constants.js | 0 {packages/game/src => src}/js/Game.js | 0 {packages/game/src => src}/js/SJDON.js | 0 {packages/game/src => src}/js/State.js | 0 .../game/src => src}/js/connect4-winner.js | 0 {packages/game/src => src}/js/elt.js | 0 {packages/game/src => src}/js/main.js | 0 {packages/game/src => src}/js/types.d.ts | 0 {packages/game/src => src}/styles/style.css | 0 tsconfig.json | 5 +- 24 files changed, 36 insertions(+), 271 deletions(-) rename packages/game/app.jsconfig.json => app.jsconfig.json (100%) rename packages/game/gulp.tsconfig.json => gulp.tsconfig.json (100%) rename {packages/game/gulp => gulp}/Context.ts (100%) rename packages/game/gulpfile.ts => gulpfile.ts (100%) delete mode 100644 packages/game/.eslintrc.cjs delete mode 100644 packages/game/.npmignore delete mode 100644 packages/game/eslint.jsconfig.json delete mode 100644 packages/game/package.json delete mode 100644 packages/game/tsconfig.base.json delete mode 100644 packages/game/tsconfig.json rename {packages/game/src => src}/index.html (100%) rename {packages/game/src => src}/js/Constants.js (100%) rename {packages/game/src => src}/js/Game.js (100%) rename {packages/game/src => src}/js/SJDON.js (100%) rename {packages/game/src => src}/js/State.js (100%) rename {packages/game/src => src}/js/connect4-winner.js (100%) rename {packages/game/src => src}/js/elt.js (100%) rename {packages/game/src => src}/js/main.js (100%) rename {packages/game/src => src}/js/types.d.ts (100%) rename {packages/game/src => src}/styles/style.css (100%) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 2b6562c..2ef10a9 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -7,11 +7,14 @@ module.exports = { `plugin:${PluginName}/${PresetName.RecommendedWithTypeChecking}` ], env: { - node: true + node: true, + browser: true }, parserOptions: { project: [ - join(__dirname, "eslint.jsconfig.json") + join(__dirname, "app.jsconfig.json"), + join(__dirname, "eslint.jsconfig.json"), + join(__dirname, "gulp.tsconfig.json") ] } }; diff --git a/ConnectForce.code-workspace b/ConnectForce.code-workspace index 252e840..698efba 100644 --- a/ConnectForce.code-workspace +++ b/ConnectForce.code-workspace @@ -1,11 +1,6 @@ { "folders": [ { - "name": "ConnectForce", - "path": "./packages/game" - }, - { - "name": "Solution Items", "path": "." } ], @@ -31,7 +26,7 @@ "label": "Build", "type": "shell", "options": { - "cwd": "${workspaceFolder:Solution Items}" + "cwd": "${workspaceFolder}" }, "command": "npm", "args": [ @@ -68,7 +63,7 @@ "label": "Rebuild", "type": "shell", "options": { - "cwd": "${workspaceFolder:Solution Items}" + "cwd": "${workspaceFolder}" }, "command": "npm", "args": [ @@ -84,7 +79,7 @@ "label": "Lint", "type": "shell", "options": { - "cwd": "${workspaceFolder:Solution Items}" + "cwd": "${workspaceFolder}" }, "command": "npm", "args": [ @@ -109,10 +104,10 @@ "request": "launch", "name": "Launch Website in Chrome", "url": "http://localhost:3000", - "webRoot": "${workspaceFolder:ConnectForce}/lib/static", + "webRoot": "${workspaceFolder}/lib/static", "preLaunchTask": "Build", "pathMapping": { - "/": "${workspaceFolder:ConnectForce}/src" + "/": "${workspaceFolder}/src" } } ] diff --git a/packages/game/app.jsconfig.json b/app.jsconfig.json similarity index 100% rename from packages/game/app.jsconfig.json rename to app.jsconfig.json diff --git a/packages/game/gulp.tsconfig.json b/gulp.tsconfig.json similarity index 100% rename from packages/game/gulp.tsconfig.json rename to gulp.tsconfig.json diff --git a/packages/game/gulp/Context.ts b/gulp/Context.ts similarity index 100% rename from packages/game/gulp/Context.ts rename to gulp/Context.ts diff --git a/packages/game/gulpfile.ts b/gulpfile.ts similarity index 100% rename from packages/game/gulpfile.ts rename to gulpfile.ts diff --git a/package.json b/package.json index 5c4160b..38b2204 100644 --- a/package.json +++ b/package.json @@ -1,26 +1,31 @@ { "name": "connect-force", - "private": true, - "files": [], - "workspaces": { - "packages": [ - "./packages/*" - ] - }, + "version": "0.0.0", + "type": "module", + "description": "A selfmade Connect Four game.", + "author": "Manuel Thalmann ", "scripts": { - "rebuild": "npm run --workspaces rebuild", - "watch": "concurrently --raw \"npm run --workspaces --if-present watch\"", - "clean": "npm run --workspaces clean", - "lint-local": "eslint --max-warnings 0 .eslintrc.cjs", - "lint-local-ide": "npm run lint-local || exit 0", - "lint": "npm run lint-local && npm run --workspaces lint", - "lint-ide": "npm run lint-local-ide && npm run --workspaces lint-ide", - "test": "npm run --workspaces test", + "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", - "concurrently": "^7.6.0", - "eslint": "^8.29.0" + "@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" } } diff --git a/packages/game/.eslintrc.cjs b/packages/game/.eslintrc.cjs deleted file mode 100644 index 8ace1ab..0000000 --- a/packages/game/.eslintrc.cjs +++ /dev/null @@ -1,14 +0,0 @@ -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") - ] - } -}; diff --git a/packages/game/.npmignore b/packages/game/.npmignore deleted file mode 100644 index b04af65..0000000 --- a/packages/game/.npmignore +++ /dev/null @@ -1,168 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* -.pnpm-debug.log* - -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage -*.lcov - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# Snowpack dependency directory (https://snowpack.dev/) -web_modules/ - -# TypeScript cache -*.tsbuildinfo - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional stylelint cache -.stylelintcache - -# Microbundle cache -.rpt2_cache/ -.rts2_cache_cjs/ -.rts2_cache_es/ -.rts2_cache_umd/ - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variable files -.env -.env.development.local -.env.test.local -.env.production.local -.env.local - -# parcel-bundler cache (https://parceljs.org/) -.cache -.parcel-cache - -# Next.js build output -.next -out - -# Nuxt.js build / generate output -.nuxt -dist - -# Gatsby files -.cache/ -# Comment in the public line in if your project uses Gatsby and *not* Next.js -# https://nextjs.org/blog/next-9-1#public-directory-support -# public - -# vuepress build output -.vuepress/dist - -# vuepress v2.x temp and cache directory -.temp -.cache - -# Docusaurus cache and generated files -.docusaurus - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# TernJS port file -.tern-port - -# Stores VSCode versions used for testing VSCode extensions -.vscode-test - -# yarn v2 -.yarn/cache -.yarn/unplugged -.yarn/build-state.yml -.yarn/install-state.gz -.pnp.* - -# Source-files -[Ss]rc/ - -# TypeScript config-files -tsconfig.json -tsconfig.*.json - -# Lint config-files -.eslintrc -.eslintrc.* - -# Source-maps -[Ll]ib/**/*.map - -# Unit-Tests -.mocharc.* -[Ll]ib/tests/ - -# Visual Studio Code-Environment -.vscode/ - -# GitHub configuration -.github/ - -# CI configuration -.drone.yml -.woodpecker.yml - -# Build Environment -gulp/ -gulpfile.ts - -# Temporary release-assets -.tagName.txt -.tagHeading.txt -.releaseNotes.md -.releaseTitle.md diff --git a/packages/game/eslint.jsconfig.json b/packages/game/eslint.jsconfig.json deleted file mode 100644 index df23cb5..0000000 --- a/packages/game/eslint.jsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "./tsconfig.base.json", - "compilerOptions": { - "allowJs": true, - "checkJs": true - }, - "include": [ - "./.eslintrc.cjs" - ] -} diff --git a/packages/game/package.json b/packages/game/package.json deleted file mode 100644 index 38b2204..0000000 --- a/packages/game/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "connect-force", - "version": "0.0.0", - "type": "module", - "description": "A selfmade Connect Four game.", - "author": "Manuel Thalmann ", - "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" - } -} diff --git a/packages/game/tsconfig.base.json b/packages/game/tsconfig.base.json deleted file mode 100644 index 4c409ed..0000000 --- a/packages/game/tsconfig.base.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../tsconfig.base.json" -} \ No newline at end of file diff --git a/packages/game/tsconfig.json b/packages/game/tsconfig.json deleted file mode 100644 index c78fdbc..0000000 --- a/packages/game/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "./tsconfig.base.json", - "references": [ - { - "path": "./app.jsconfig.json" - }, - { - "path": "./eslint.jsconfig.json" - }, - { - "path": "./gulp.tsconfig.json" - } - ], - "include": [] -} diff --git a/packages/game/src/index.html b/src/index.html similarity index 100% rename from packages/game/src/index.html rename to src/index.html diff --git a/packages/game/src/js/Constants.js b/src/js/Constants.js similarity index 100% rename from packages/game/src/js/Constants.js rename to src/js/Constants.js diff --git a/packages/game/src/js/Game.js b/src/js/Game.js similarity index 100% rename from packages/game/src/js/Game.js rename to src/js/Game.js diff --git a/packages/game/src/js/SJDON.js b/src/js/SJDON.js similarity index 100% rename from packages/game/src/js/SJDON.js rename to src/js/SJDON.js diff --git a/packages/game/src/js/State.js b/src/js/State.js similarity index 100% rename from packages/game/src/js/State.js rename to src/js/State.js diff --git a/packages/game/src/js/connect4-winner.js b/src/js/connect4-winner.js similarity index 100% rename from packages/game/src/js/connect4-winner.js rename to src/js/connect4-winner.js diff --git a/packages/game/src/js/elt.js b/src/js/elt.js similarity index 100% rename from packages/game/src/js/elt.js rename to src/js/elt.js diff --git a/packages/game/src/js/main.js b/src/js/main.js similarity index 100% rename from packages/game/src/js/main.js rename to src/js/main.js diff --git a/packages/game/src/js/types.d.ts b/src/js/types.d.ts similarity index 100% rename from packages/game/src/js/types.d.ts rename to src/js/types.d.ts diff --git a/packages/game/src/styles/style.css b/src/styles/style.css similarity index 100% rename from packages/game/src/styles/style.css rename to src/styles/style.css diff --git a/tsconfig.json b/tsconfig.json index 2dec9ec..c78fdbc 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,11 +1,14 @@ { "extends": "./tsconfig.base.json", "references": [ + { + "path": "./app.jsconfig.json" + }, { "path": "./eslint.jsconfig.json" }, { - "path": "./packages/game" + "path": "./gulp.tsconfig.json" } ], "include": []