Skip to content

Commit 8f99af7

Browse files
authored
Build LSP directly in destination so source maps are correct (#749)
* Build LSP directly in destination so source maps are correct * Fix LSP `outFiles` * Trigger workflows on LSP changes
1 parent effd3a6 commit 8f99af7

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ on:
66
branches:
77
- main
88
paths:
9+
- 'apps/lsp/**'
910
- 'apps/vscode/**'
1011
pull_request:
1112
branches:
1213
- main
1314
paths:
15+
- 'apps/lsp/**'
1416
- 'apps/vscode/**'
1517
workflow_dispatch:
1618

.vscode/launch.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
"name": "Attach to VS Code LSP Server",
2323
"port": 6009,
2424
"restart": true,
25-
"outFiles": ["${workspaceRoot}/out/**/*.js"]
25+
"outFiles": [
26+
"${workspaceFolder}/apps/vscode/out/lsp/**/*.js"
27+
]
2628
}
27-
]
29+
]
2830
}

apps/lsp/build.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ const nodeSqlLiteWasm = '../../node_modules/node-sqlite3-wasm/dist/*.wasm';
2323

2424
runBuild({
2525
entryPoints: ['./src/index.ts'],
26-
outfile: './dist/lsp.js',
26+
outfile: '../vscode/out/lsp/lsp.js',
2727
assets: [
28-
{ from: [nodeSqlLiteWasm], to: './dist/' },
29-
{ from: ['./src/run.js'], to: './dist' },
30-
{ from: ['../../packages/editor-server/src/resources/**'], to: './dist/resources/' },
31-
{ from: ['../../packages/quarto-core/src/resources/**'], to: './dist/resources/' },
32-
{ from: ['./dist/**'], to: ['../vscode/out/lsp/'] }],
28+
{ from: [nodeSqlLiteWasm], to: '../vscode/out/lsp/' },
29+
{ from: ['./src/run.js'], to: '../vscode/out/lsp' },
30+
{ from: ['../../packages/editor-server/src/resources/**'], to: '../vscode/out/lsp/resources/' },
31+
{ from: ['../../packages/quarto-core/src/resources/**'], to: '../vscode/out/lsp/resources/' }
32+
],
3333
minify: !dev,
3434
dev
3535
})

0 commit comments

Comments
 (0)