Skip to content

Commit

Permalink
Add sourceMaps and vscode debug configurations (smogon#1707)
Browse files Browse the repository at this point in the history
* launch json

* vscode updates

* clientUrl rename
  • Loading branch information
aviettran authored Jan 11, 2021
1 parent e1ab227 commit 1f3c8cf
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@
],
"compact": true,
"comments": false,
"retainLines": true
"retainLines": true,
"sourceMaps": true
}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Thumbs.db
npm-debug.log
package-lock.json
/vendor/
.vscode

/js/battle.js
/js/battledata.js
Expand Down Expand Up @@ -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
Expand Down
23 changes: 23 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -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 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"editor.formatOnSave": false,
"showdown.server": "", // e.g., "?~~localhost:8000"
"showdown.clientUrl": "http://localhost:8080"
}
2 changes: 1 addition & 1 deletion build-tools/update
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 1f3c8cf

Please sign in to comment.