Skip to content

Instantly share code, notes, and snippets.

@bmingles
Created December 10, 2018 14:43
Show Gist options
  • Save bmingles/23b90a93ed7088feb73d4d4294555f8a to your computer and use it in GitHub Desktop.
Save bmingles/23b90a93ed7088feb73d4d4294555f8a to your computer and use it in GitHub Desktop.
vscode - sample launch config + preLaunchTask with watch
// launch.json
{
"type": "node",
"request": "launch",
"name": "Server build and debug",
"useWSL": true,
"program": "${workspaceFolder}/server/js/src/app.ts",
"cwd": "${workspaceFolder}/server",
"preLaunchTask": "npm-buildserver",
"outFiles": [
"${workspaceFolder}/server/js/build/**/*.js"
]
}
// tasks.json
{
"label": "npm-buildserver",
"isBackground": true,
"type": "npm",
"script": "buildserver",
"problemMatcher": [
"$tsc-watch"
]
}
// package.json
{
"buildserver": "./node_modules/.bin/tsc -w -p ./server/js"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment