| 1 |
#!/usr/bin/env node |
| 2 |
/*--------------------------------------------------------------------------------------------- |
| 3 |
* Copyright (c) Microsoft Corporation. All rights reserved. |
| 4 |
* Licensed under the MIT License. See License.txt in the project root for license information. |
| 5 |
*--------------------------------------------------------------------------------------------*/ |
| 6 |
'use strict'; |
| 7 |
//@ts-check |
| 8 |
|
| 9 |
const path = require('path'); |
| 10 |
const ln = require('./linking'); |
| 11 |
|
| 12 |
const root = path.dirname(path.dirname(__dirname)); |
| 13 |
|
| 14 |
(async function main() { |
| 15 |
console.log('Symlinking node modules for test setup'); |
| 16 |
|
| 17 |
// test-extension |
| 18 |
const extensionFolder = path.join(root, 'client-node-tests'); |
| 19 |
await ln.tryLinkJsonRpc(extensionFolder); |
| 20 |
await ln.tryLinkTypes(extensionFolder); |
| 21 |
await ln.tryLinkProtocol(extensionFolder); |
| 22 |
await ln.tryLink(extensionFolder, 'vscode-languageserver', path.join('..', '..', 'server')); |
| 23 |
|
| 24 |
// Hard link the client to have a real path from the node_modules folder |
| 25 |
await ln.tryHardLink(path.join(root, 'client'), path.join(extensionFolder, 'node_modules', 'vscode-languageclient')); |
| 26 |
})(); |