From c21f03b0507d88be3a545be34e3addccaa60a25d Mon Sep 17 00:00:00 2001 From: dpassoni Date: Thu, 12 Jan 2023 17:22:49 +0100 Subject: [PATCH] Fixed client debug --- client/.vscode/launch.json | 5 ++- client/.vscode/tasks.json | 62 +++++++++++++---------------- client/debug.bat | 2 +- client/package-lock.json | 1 - client/package.json | 2 +- client/public/javascripts/bundle.js | 2 +- client/{ => src}/index.ts | 0 7 files changed, 34 insertions(+), 40 deletions(-) rename client/{ => src}/index.ts (100%) diff --git a/client/.vscode/launch.json b/client/.vscode/launch.json index 08a22f5f..557b7a47 100644 --- a/client/.vscode/launch.json +++ b/client/.vscode/launch.json @@ -9,7 +9,10 @@ "request": "launch", "name": "Launch Chrome against localhost", "url": "http://localhost:3000", - "webRoot": "${workspaceFolder}\\.." + "webRoot": "${workspaceFolder}/public/", + "sourceMapPathOverrides": { + "src/*": "${workspaceFolder}/src/*" + } } ] } \ No newline at end of file diff --git a/client/.vscode/tasks.json b/client/.vscode/tasks.json index e54a81ac..28cb7f76 100644 --- a/client/.vscode/tasks.json +++ b/client/.vscode/tasks.json @@ -1,41 +1,33 @@ { "version": "2.0.0", "tasks": [ - { - "type": "npm", - "script": "start", - "isBackground": true, - "presentation": { - "focus": true, - "panel": "dedicated" - }, - "group": { - "kind": "build", - "isDefault": true - }, - "problemMatcher": { - "owner": "typescript", - "source": "ts", - "applyTo": "closedDocuments", - "fileLocation": [ - "relative", - "${cwd}" - ], - "pattern": "$tsc", - "background": { - "activeOnStart": true, - "beginsPattern": { - "regexp": "(.*?)" - }, - "endsPattern": { - "regexp": "Compiled |Failed to compile." + { + "type": "npm", + "script": "start", + "problemMatcher": [ + { + "pattern": [ + { + "regexp": ".", + "file": 1, + "location": 2, + "message": 3 + } + ], + "background": { + "activeOnStart": true, + "beginsPattern": ".", + "endsPattern": ".", + } + } + ], + "isBackground": true, + "label": "npm: start", + "detail": "node ./bin/www", + "group": { + "kind": "build", + "isDefault": true } - } - }, - "options": { - "cwd": "${workspaceFolder}" } - } ] - } - \ No newline at end of file +} \ No newline at end of file diff --git a/client/debug.bat b/client/debug.bat index b046020a..be565780 100644 --- a/client/debug.bat +++ b/client/debug.bat @@ -1,2 +1,2 @@ start cmd /k "npm run start" -start cmd /k "watchify .\index.ts --debug -p [ tsify --noImplicitAny ] -o .\public\javascripts\bundle.js" +start cmd /k "watchify .\src\index.ts --debug -p [ tsify --noImplicitAny ] -o .\public\javascripts\bundle.js" diff --git a/client/package-lock.json b/client/package-lock.json index 2f00f7af..af9a30ed 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -5,7 +5,6 @@ "requires": true, "packages": { "": { - "name": "client", "version": "0.0.0", "dependencies": { "@types/geojson": "^7946.0.10", diff --git a/client/package.json b/client/package.json index 06b4bae3..54a42ed6 100644 --- a/client/package.json +++ b/client/package.json @@ -3,7 +3,7 @@ "version": "0.0.0", "private": true, "scripts": { - "start": "node ./bin/www" + "start": "nodemon ./bin/www" }, "dependencies": { "@types/geojson": "^7946.0.10", diff --git a/client/public/javascripts/bundle.js b/client/public/javascripts/bundle.js index 9ae1fbf2..b08f1bb7 100644 --- a/client/public/javascripts/bundle.js +++ b/client/public/javascripts/bundle.js @@ -1,4 +1,4 @@ (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i