mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-29 21:11:38 +01:00
esm - convert bootstrap files to TS (part 2)
This commit is contained in:
24
src/bootstrap-meta.ts
Normal file
24
src/bootstrap-meta.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* eslint-disable local/code-import-patterns */
|
||||
|
||||
import { createRequire } from 'node:module';
|
||||
import { IProductConfiguration } from './vs/base/common/product.js';
|
||||
|
||||
const require = createRequire(import.meta.url);
|
||||
|
||||
let productObj: Partial<IProductConfiguration> & { BUILD_INSERT_PRODUCT_CONFIGURATION?: string } = { BUILD_INSERT_PRODUCT_CONFIGURATION: 'BUILD_INSERT_PRODUCT_CONFIGURATION' }; // DO NOT MODIFY, PATCHED DURING BUILD
|
||||
if (productObj['BUILD_INSERT_PRODUCT_CONFIGURATION']) {
|
||||
productObj = require('../product.json'); // Running out of sources
|
||||
}
|
||||
|
||||
let pkgObj = { BUILD_INSERT_PACKAGE_CONFIGURATION: 'BUILD_INSERT_PACKAGE_CONFIGURATION' }; // DO NOT MODIFY, PATCHED DURING BUILD
|
||||
if (pkgObj['BUILD_INSERT_PACKAGE_CONFIGURATION']) {
|
||||
pkgObj = require('../package.json'); // Running out of sources
|
||||
}
|
||||
|
||||
export const product = productObj;
|
||||
export const pkg = pkgObj;
|
||||
Reference in New Issue
Block a user