Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/cli.ts
3285 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import './bootstrap-cli.js'; // this MUST come before other imports as it changes global state
7
import { configurePortable } from './bootstrap-node.js';
8
import { bootstrapESM } from './bootstrap-esm.js';
9
import { resolveNLSConfiguration } from './vs/base/node/nls.js';
10
import { product } from './bootstrap-meta.js';
11
12
// NLS
13
const nlsConfiguration = await resolveNLSConfiguration({ userLocale: 'en', osLocale: 'en', commit: product.commit, userDataPath: '', nlsMetadataPath: import.meta.dirname });
14
process.env['VSCODE_NLS_CONFIG'] = JSON.stringify(nlsConfiguration); // required for `bootstrap-esm` to pick up NLS messages
15
16
// Enable portable support
17
configurePortable(product);
18
19
// Signal processes that we got launched as CLI
20
process.env['VSCODE_CLI'] = '1';
21
22
// Bootstrap ESM
23
await bootstrapESM();
24
25
// Load Server
26
await import('./vs/code/node/cli.js');
27
28