diff --git a/src/buildfile.js b/src/buildfile.js index f5df248ba21..4a174a51436 100644 --- a/src/buildfile.js +++ b/src/buildfile.js @@ -3,7 +3,30 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -const { createModuleDescription, createEditorWorkerModuleDescription } = require('./vs/base/buildfile'); +/** + * @param {string} name + * @param {string[]} exclude + */ +function createModuleDescription(name, exclude) { + + let excludes = ['vs/css', 'vs/nls']; + if (Array.isArray(exclude) && exclude.length > 0) { + excludes = excludes.concat(exclude); + } + + return { + name: name, + include: [], + exclude: excludes + }; +} + +/** + * @param {string} name + */ +function createEditorWorkerModuleDescription(name) { + return createModuleDescription(name, ['vs/base/common/worker/simpleWorker', 'vs/editor/common/services/editorSimpleWorker']); +} exports.base = [ { @@ -28,8 +51,18 @@ exports.workerSharedProcess = [createEditorWorkerModuleDescription('vs/platform/ exports.workerLanguageDetection = [createEditorWorkerModuleDescription('vs/workbench/services/languageDetection/browser/languageDetectionSimpleWorker')]; exports.workerLocalFileSearch = [createEditorWorkerModuleDescription('vs/workbench/services/search/worker/localFileSearch')]; -exports.workbenchDesktop = require('./vs/workbench/buildfile.desktop').collectModules(); -exports.workbenchWeb = require('./vs/workbench/buildfile.web').collectModules(); +exports.workbenchDesktop = [ + createEditorWorkerModuleDescription('vs/workbench/contrib/output/common/outputLinkComputer'), + createModuleDescription('vs/workbench/contrib/debug/node/telemetryApp'), + createModuleDescription('vs/platform/files/node/watcher/watcherMain'), + createModuleDescription('vs/platform/terminal/node/ptyHostMain'), + createModuleDescription('vs/workbench/api/node/extensionHostProcess') +]; + +exports.workbenchWeb = [ + createEditorWorkerModuleDescription('vs/workbench/contrib/output/common/outputLinkComputer'), + createModuleDescription('vs/code/browser/workbench/workbench', ['vs/workbench/workbench.web.main']) +]; exports.keyboardMaps = [ createModuleDescription('vs/workbench/services/keybinding/browser/keyboardLayouts/layout.contribution.linux'), @@ -37,6 +70,14 @@ exports.keyboardMaps = [ createModuleDescription('vs/workbench/services/keybinding/browser/keyboardLayouts/layout.contribution.win') ]; -exports.code = require('./vs/code/buildfile').collectModules(); +exports.code = [ + createModuleDescription('vs/code/electron-main/main'), + createModuleDescription('vs/code/node/cli'), + createModuleDescription('vs/code/node/cliProcessMain', ['vs/code/node/cli']), + createModuleDescription('vs/code/electron-sandbox/issue/issueReporterMain'), + createModuleDescription('vs/code/electron-browser/sharedProcess/sharedProcessMain'), + createModuleDescription('vs/platform/driver/node/driver'), + createModuleDescription('vs/code/electron-sandbox/processExplorer/processExplorerMain') +]; exports.entrypoint = createModuleDescription; diff --git a/src/vs/base/buildfile.js b/src/vs/base/buildfile.js deleted file mode 100644 index b2240ca2f1c..00000000000 --- a/src/vs/base/buildfile.js +++ /dev/null @@ -1,33 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -/** - * @param {string} name - * @param {string[]} exclude - */ -function createModuleDescription(name, exclude) { - - let excludes = ['vs/css', 'vs/nls']; - if (Array.isArray(exclude) && exclude.length > 0) { - excludes = excludes.concat(exclude); - } - - return { - name: name, - include: [], - exclude: excludes - }; -} - -/** - * @param {string} name - */ -function createEditorWorkerModuleDescription(name) { - return createModuleDescription(name, ['vs/base/common/worker/simpleWorker', 'vs/editor/common/services/editorSimpleWorker']); -} - -exports.createModuleDescription = createModuleDescription; -exports.createEditorWorkerModuleDescription = createEditorWorkerModuleDescription; diff --git a/src/vs/code/buildfile.js b/src/vs/code/buildfile.js deleted file mode 100644 index df7ba33b058..00000000000 --- a/src/vs/code/buildfile.js +++ /dev/null @@ -1,19 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -const { createModuleDescription } = require('../base/buildfile'); - -exports.collectModules = function () { - return [ - createModuleDescription('vs/code/electron-main/main'), - createModuleDescription('vs/code/node/cli'), - createModuleDescription('vs/code/node/cliProcessMain', ['vs/code/node/cli']), - createModuleDescription('vs/code/electron-sandbox/issue/issueReporterMain'), - createModuleDescription('vs/code/electron-browser/sharedProcess/sharedProcessMain'), - createModuleDescription('vs/platform/driver/node/driver'), - createModuleDescription('vs/code/electron-sandbox/processExplorer/processExplorerMain') - ]; -}; diff --git a/src/vs/workbench/buildfile.desktop.js b/src/vs/workbench/buildfile.desktop.js deleted file mode 100644 index 5f40e47276b..00000000000 --- a/src/vs/workbench/buildfile.desktop.js +++ /dev/null @@ -1,21 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -const { createModuleDescription, createEditorWorkerModuleDescription } = require('../base/buildfile'); - -exports.collectModules = function () { - return [ - createEditorWorkerModuleDescription('vs/workbench/contrib/output/common/outputLinkComputer'), - - createModuleDescription('vs/workbench/contrib/debug/node/telemetryApp'), - - createModuleDescription('vs/platform/files/node/watcher/watcherMain'), - - createModuleDescription('vs/platform/terminal/node/ptyHostMain'), - - createModuleDescription('vs/workbench/api/node/extensionHostProcess'), - ]; -}; diff --git a/src/vs/workbench/buildfile.web.js b/src/vs/workbench/buildfile.web.js deleted file mode 100644 index 3770c48ecc0..00000000000 --- a/src/vs/workbench/buildfile.web.js +++ /dev/null @@ -1,14 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -const { createModuleDescription, createEditorWorkerModuleDescription } = require('../base/buildfile'); - -exports.collectModules = function () { - return [ - createEditorWorkerModuleDescription('vs/workbench/contrib/output/common/outputLinkComputer'), - createModuleDescription('vs/code/browser/workbench/workbench', ['vs/workbench/workbench.web.main']), - ]; -};