Add sourceMaps and vscode debug configurations (#1707)

* launch json

* vscode updates

* clientUrl rename
This commit is contained in:
Adam Tran 2021-01-10 19:58:28 -05:00 committed by GitHub
parent e1ab227783
commit 1f3c8cf450
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 32 additions and 3 deletions

View File

@ -31,5 +31,6 @@
],
"compact": true,
"comments": false,
"retainLines": true
"retainLines": true,
"sourceMaps": true
}

2
.gitignore vendored
View File

@ -13,7 +13,6 @@ Thumbs.db
npm-debug.log
package-lock.json
/vendor/
.vscode
/js/battle.js
/js/battledata.js
@ -43,6 +42,7 @@ package-lock.json
/js/panel-teamdropdown.js
/js/panel-battle.js
/js/replay-embed.js
/js/*.js.map
/replays/caches/
/replays/replay-config.inc.php

23
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,23 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Chrome: Test Client Beta (Preact)",
"port": 9222,
"request": "launch",
"url": "${config:showdown.clientUrl}/testclient-beta.html${config:showdown.server}",
"type": "pwa-chrome",
"webRoot": "${workspaceFolder}",
"preLaunchTask": "npm: build"
},
{
"name": "Chrome: Test Client",
"port": 9222,
"request": "launch",
"url": "${config:showdown.clientUrl}/testclient.html${config:showdown.server}",
"type": "pwa-chrome",
"webRoot": "${workspaceFolder}",
"preLaunchTask": "npm: build"
}
]
}

5
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,5 @@
{
"editor.formatOnSave": false,
"showdown.server": "", // e.g., "?~~localhost:8000"
"showdown.clientUrl": "http://localhost:8080"
}

View File

@ -82,7 +82,7 @@ if (process.argv[2] === 'full') {
} catch (e) {}
}
child_process.execSync(`node build-tools/babel-cli/bin/babel.js src --out-dir js --extensions ".ts,.tsx" --incremental${ignoreGraphics}`);
child_process.execSync(`node build-tools/babel-cli/bin/babel.js src --out-dir js --extensions ".ts,.tsx" --incremental${ignoreGraphics} --source-maps`);
let textData = '';
try {