mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-04-27 16:55:44 +08:00
Tweak LSIF generation
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,5 +4,6 @@ Thumbs.db
|
||||
*/node_modules/
|
||||
*/out/
|
||||
*/.vs/
|
||||
tsconfig.lsif.json
|
||||
*.lsif
|
||||
*.db
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
{
|
||||
"project": ".lsif/tsconfig.json",
|
||||
"project": "tsconfig.lsif.json",
|
||||
"out": "vscode-extension-samples.lsif"
|
||||
}
|
||||
@ -11,7 +11,7 @@ async function main() {
|
||||
try {
|
||||
const stat = await fs.stat(path.join(root, sample.path, 'tsconfig.json'));
|
||||
if (stat.isFile()) {
|
||||
references.push(`../${sample.path}/tsconfig.json`);
|
||||
references.push(`./${sample.path}/tsconfig.json`);
|
||||
}
|
||||
} catch (error) {
|
||||
// Ignore error of stat call.
|
||||
@ -24,7 +24,7 @@ async function main() {
|
||||
],
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user