Skip to content

Commit d3cc851

Browse files
committed
Add launch settings in VSCode for pytest and documentation generation.
1 parent 0e7824f commit d3cc851

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

.vscode/launch.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,29 @@
2222
"cwd": "${workspaceFolder}/examples",
2323
"console": "integratedTerminal",
2424
"preLaunchTask": "develop python-tcod",
25+
},
26+
{
27+
"name": "Python: Run tests",
28+
"type": "python",
29+
"request": "launch",
30+
"module": "pytest",
31+
"preLaunchTask": "develop python-tcod",
32+
},
33+
{
34+
"name": "Documentation: Launch Chrome",
35+
"request": "launch",
36+
"type": "pwa-chrome",
37+
"url": "file://${workspaceFolder}/docs/_build/html/index.html",
38+
"webRoot": "${workspaceFolder}",
39+
"preLaunchTask": "build documentation",
40+
},
41+
{
42+
"name": "Documentation: Launch Edge",
43+
"request": "launch",
44+
"type": "pwa-msedge",
45+
"url": "file://${workspaceFolder}/docs/_build/html/index.html",
46+
"webRoot": "${workspaceFolder}",
47+
"preLaunchTask": "build documentation",
2548
}
2649
]
2750
}

.vscode/tasks.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,37 @@
88
"label": "develop python-tcod",
99
"type": "shell",
1010
"command": "python setup.py develop"
11+
},
12+
{
13+
"label": "install documentation requirements",
14+
"type": "process",
15+
"command": "python",
16+
"args": [
17+
"-m",
18+
"pip",
19+
"install",
20+
"--requirement",
21+
"docs/requirements.txt"
22+
],
23+
"problemMatcher": []
24+
},
25+
{
26+
"label": "build documentation",
27+
"type": "shell",
28+
"command": "make",
29+
"args": [
30+
"html"
31+
],
32+
"options": {
33+
"cwd": "${workspaceFolder}/docs"
34+
},
35+
"problemMatcher": [],
36+
"dependsOn": [
37+
"install documentation requirements"
38+
],
39+
"windows": {
40+
"command": "./make.bat"
41+
}
1142
}
1243
]
1344
}

0 commit comments

Comments
 (0)