Skip to content

Commit 3e3d2ca

Browse files
committed
Add launch configurations
1 parent 31f23bd commit 3e3d2ca

File tree

3 files changed

+45
-1
lines changed

3 files changed

+45
-1
lines changed

.vscode/launch.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Program",
6+
"preLaunchTask": "Debug",
7+
"request": "launch",
8+
"type": "node",
9+
"program": "${workspaceFolder}/bin/PhpMinifier.js",
10+
"args": ["--mode=fast", "${input:input}"]
11+
},
12+
{
13+
"name": "Tests",
14+
"request": "launch",
15+
"type": "node",
16+
"program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js",
17+
"args": ["test"]
18+
}
19+
],
20+
"inputs": [
21+
{
22+
"description": "The path to the input directory.",
23+
"id": "input",
24+
"type": "promptString"
25+
}
26+
]
27+
}

.vscode/tasks.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "Debug",
6+
"type": "shell",
7+
"command": "gulp",
8+
"args": ["debug"],
9+
"problemMatcher": "$tsc"
10+
}
11+
]
12+
}

gulpfile.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ export async function clean() {
1515
for (const file of await readdir("var")) if (file != ".gitkeep") await rm(join("var", file), {recursive: true});
1616
}
1717

18+
/** Builds the project in debug mode. */
19+
export async function debug() {
20+
await run("npx tsc --build src/tsconfig.json --sourceMap");
21+
}
22+
1823
/** Builds the documentation. */
1924
export async function doc() {
2025
await run("npx typedoc --options etc/TypeDoc.js");
@@ -35,7 +40,7 @@ export async function publish() {
3540

3641
/** Runs the test suite. */
3742
export async function test() {
38-
await run("npx tsc --build src/tsconfig.json --sourceMap");
43+
await debug();
3944
await run("node --enable-source-maps --test");
4045
}
4146

0 commit comments

Comments
 (0)