Tweak LSIF generation

This commit is contained in:
Dirk Baeumer
2021-07-07 15:23:56 +02:00
parent e8dd5916b2
commit c27198c2b9
3 changed files with 4 additions and 3 deletions

1
.gitignore vendored
View File

@ -4,5 +4,6 @@ Thumbs.db
*/node_modules/ */node_modules/
*/out/ */out/
*/.vs/ */.vs/
tsconfig.lsif.json
*.lsif *.lsif
*.db *.db

View File

@ -1,4 +1,4 @@
{ {
"project": ".lsif/tsconfig.json", "project": "tsconfig.lsif.json",
"out": "vscode-extension-samples.lsif" "out": "vscode-extension-samples.lsif"
} }

View File

@ -11,7 +11,7 @@ async function main() {
try { try {
const stat = await fs.stat(path.join(root, sample.path, 'tsconfig.json')); const stat = await fs.stat(path.join(root, sample.path, 'tsconfig.json'));
if (stat.isFile()) { if (stat.isFile()) {
references.push(`../${sample.path}/tsconfig.json`); references.push(`./${sample.path}/tsconfig.json`);
} }
} catch (error) { } catch (error) {
// Ignore error of stat call. // Ignore error of stat call.
@ -24,7 +24,7 @@ async function main() {
], ],
references: references.map(reference => { return { path: reference }}) references: references.map(reference => { return { path: reference }})
} }
await fs.writeFile(path.join(root, '.lsif', 'tsconfig.json'), JSON.stringify(tsconfig, undefined, '\t'), { encoding: 'utf8' }); await fs.writeFile(path.join(root, 'tsconfig.lsif.json'), JSON.stringify(tsconfig, undefined, '\t'), { encoding: 'utf8' });
} }
main().catch(console.error); main().catch(console.error);