mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
Strip webEndpointUrlTemplate from reh-web builds
This commit is contained in:
@@ -346,6 +346,15 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {object} product The parsed product.json file contents
|
||||
*/
|
||||
function tweakProductForServerWeb(product) {
|
||||
const result = { ...product };
|
||||
delete result.webEndpointUrlTemplate;
|
||||
return result;
|
||||
}
|
||||
|
||||
['reh', 'reh-web'].forEach(type => {
|
||||
const optimizeTask = task.define(`optimize-vscode-${type}`, task.series(
|
||||
util.rimraf(`out-vscode-${type}`),
|
||||
@@ -358,7 +367,7 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
|
||||
out: `out-vscode-${type}`,
|
||||
inlineAmdImages: true,
|
||||
bundleInfo: undefined,
|
||||
fileContentMapper: createVSCodeWebFileContentMapper('.build/extensions')
|
||||
fileContentMapper: createVSCodeWebFileContentMapper('.build/extensions', type === 'reh-web' ? tweakProductForServerWeb(product) : product)
|
||||
})
|
||||
));
|
||||
|
||||
|
||||
@@ -77,7 +77,10 @@ exports.vscodeWebEntryPoints = vscodeWebEntryPoints;
|
||||
|
||||
const buildDate = new Date().toISOString();
|
||||
|
||||
const createVSCodeWebProductConfigurationPatcher = () => {
|
||||
/**
|
||||
* @param {object} product The parsed product.json file contents
|
||||
*/
|
||||
const createVSCodeWebProductConfigurationPatcher = (product) => {
|
||||
/**
|
||||
* @param content {string} The contens of the file
|
||||
* @param path {string} The absolute file path, always using `/`, even on Windows
|
||||
@@ -139,10 +142,11 @@ const combineContentPatchers = (...patchers) => {
|
||||
|
||||
/**
|
||||
* @param extensionsRoot {string} The location where extension will be read from
|
||||
* @param {object} product The parsed product.json file contents
|
||||
*/
|
||||
const createVSCodeWebFileContentMapper = (extensionsRoot) => {
|
||||
const createVSCodeWebFileContentMapper = (extensionsRoot, product) => {
|
||||
return combineContentPatchers(
|
||||
createVSCodeWebProductConfigurationPatcher(),
|
||||
createVSCodeWebProductConfigurationPatcher(product),
|
||||
createVSCodeWebBuiltinExtensionsPatcher(extensionsRoot)
|
||||
);
|
||||
};
|
||||
@@ -160,7 +164,7 @@ const optimizeVSCodeWebTask = task.define('optimize-vscode-web', task.series(
|
||||
out: 'out-vscode-web',
|
||||
inlineAmdImages: true,
|
||||
bundleInfo: undefined,
|
||||
fileContentMapper: createVSCodeWebFileContentMapper('.build/web/extensions')
|
||||
fileContentMapper: createVSCodeWebFileContentMapper('.build/web/extensions', product)
|
||||
})
|
||||
));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user