Skip to content

Instantly share code, notes, and snippets.

@MikeyBurkman
Last active February 6, 2022 19:33
Show Gist options
  • Save MikeyBurkman/34065ad31bbd8f017db910104a7ce680 to your computer and use it in GitHub Desktop.
Save MikeyBurkman/34065ad31bbd8f017db910104a7ce680 to your computer and use it in GitHub Desktop.
JS/Typescript Launch.json files
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Start",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/index.js",
"stopOnEntry": false,
"runtimeExecutable": null,
"skipFiles": [
"${workspaceRoot}/node_modules/**/*.js",
"<node_internals>/**/*.js"
]
},
{
"name": "Test This File",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"stopOnEntry": false,
"args": ["${file}", "--no-timeouts", "--exit"],
"cwd": "${workspaceRoot}",
"runtimeExecutable": null,
"env": {
"ALLOW_CONFIG_MUTATIONS": "true",
"NODE_ENV": "test"
},
"skipFiles": [
"${workspaceRoot}/node_modules/**/*.js",
"<node_internals>/**/*.js"
]
},
{
"name": "Test All",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"stopOnEntry": false,
"args": ["test/**/*.js", "--no-timeouts", "--exit"],
"cwd": "${workspaceRoot}",
"runtimeExecutable": null,
"env": {
"ALLOW_CONFIG_MUTATIONS": "true",
"NODE_ENV": "test"
},
"skipFiles": [
"${workspaceRoot}/node_modules/**/*.js",
"<node_internals>/**/*.js"
]
}
]
}
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Start",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/node_modules/.bin/ts-node",
"args": ["index.js"],
"stopOnEntry": false,
"runtimeExecutable": null,
"env": {
"TS_NODE_FILES": "true",
"NODE_PATH": "."
},
"skipFiles": [
"${workspaceRoot}/node_modules/**/*.js",
"<node_internals>/**/*.js"
]
},
{
"name": "Test All",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"stopOnEntry": false,
"args": [
"--require", "ts-node/register",
"--no-timeouts",
"--exit",
"--colors", "--recursive",
"test/**/*.{js,ts}"
],
"cwd": "${workspaceRoot}",
"runtimeExecutable": null,
"env": {
"ALLOW_CONFIG_MUTATIONS": "true",
"NODE_ENV": "test",
"NODE_PATH": "."
},
"skipFiles": [
"${workspaceRoot}/node_modules/**/*.js",
"<node_internals>/**/*.js"
]
},
{
"name": "Test This File",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"args": [
"--require",
"ts-node/register",
"--no-timeouts",
"--exit",
"--colors", "--recursive",
"${file}"
],
"stopOnEntry": false,
"cwd": "${workspaceRoot}",
"runtimeExecutable": null,
"env": {
"ALLOW_CONFIG_MUTATIONS": "true",
"NODE_ENV": "test",
"NODE_PATH": "."
},
"skipFiles": [
"${workspaceRoot}/node_modules/**/*.js",
"<node_internals>/**/*.js"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment