Skip to content

Commit 8819202

Browse files
committed
add debug config to templates
Signed-off-by: Karthik Ganeshram <[email protected]>
1 parent 78b2f16 commit 8819202

File tree

12 files changed

+82
-7
lines changed

12 files changed

+82
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ dist.js
88
dist/
99
build/
1010
docs/
11+
!templates/**/.vscode/
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"type": "starlingmonkey",
6+
"request": "launch",
7+
"name": "Debug StarlingMonkey component",
8+
"component": "${workspaceFolder}/dist/{{ project-name | kebab_case }}.wasm",
9+
"program": "${workspaceFolder}/src/index.js",
10+
"stopOnEntry": false,
11+
"trace": true
12+
}
13+
]
14+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"starlingmonkey": {
3+
"componentRuntime": {
4+
"executable": "spin",
5+
"options": [
6+
"up",
7+
"-f",
8+
"${workspaceFolder}",
9+
],
10+
}
11+
}
12+
}

templates/http-js/content/build.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,5 @@ await build({
3838
'.tsx': 'tsx',
3939
},
4040
resolveExtensions: ['.ts', '.tsx', '.js'],
41-
// This prevents sourcemaps from traversing into node_modules
4241
sourceRoot: path.resolve(process.cwd(), 'src'),
4342
});
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"type": "starlingmonkey",
6+
"request": "launch",
7+
"name": "Debug StarlingMonkey component",
8+
"component": "${workspaceFolder}/dist/{{ project-name | kebab_case }}.wasm",
9+
"program": "${workspaceFolder}/src/index.ts",
10+
"stopOnEntry": false,
11+
"trace": true
12+
}
13+
]
14+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"starlingmonkey": {
3+
"componentRuntime": {
4+
"executable": "spin",
5+
"options": [
6+
"up",
7+
"-f",
8+
"${workspaceFolder}",
9+
],
10+
}
11+
}
12+
}

templates/http-ts/content/build.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,5 @@ await build({
3838
'.tsx': 'tsx',
3939
},
4040
resolveExtensions: ['.ts', '.tsx', '.js'],
41-
// This prevents sourcemaps from traversing into node_modules
4241
sourceRoot: path.resolve(process.cwd(), 'src'),
4342
});

test/test-app/.vscode/launch.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"type": "starlingmonkey",
6+
"request": "launch",
7+
"name": "Debug StarlingMonkey component",
8+
"component": "${workspaceFolder}/dist/test-app.wasm",
9+
"program": "${workspaceFolder}/src/index.ts",
10+
"stopOnEntry": false,
11+
"trace": true
12+
}
13+
]
14+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"starlingmonkey": {
3+
"componentRuntime": {
4+
"executable": "spin",
5+
"options": [
6+
"up",
7+
"-f",
8+
"${workspaceFolder}",
9+
],
10+
}
11+
}
12+
}

test/test-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"keywords": [],
88
"license": "Apache-2.0",
99
"scripts": {
10-
"build": "node build.mjs && mkdirp dist && j2w -d -i build/bundle.js -o dist/test-app.wasm",
10+
"build": "node build.mjs && mkdirp dist && j2w -i build/bundle.js -o dist/test-app.wasm",
1111
"test": "echo \"Error: no test specified\" && exit 1"
1212
},
1313
"devDependencies": {

0 commit comments

Comments
 (0)