提交 e11081cf 编写于 作者: B Benjamin Pasero

sandbox - add a minimal product config

上级 58cee6b0
...@@ -11,8 +11,8 @@ import { env } from 'vs/base/common/process'; ...@@ -11,8 +11,8 @@ import { env } from 'vs/base/common/process';
let product: IProductConfiguration; let product: IProductConfiguration;
// Web // Web or Native (sandbox TODO@sandbox need to add all properties of product.json)
if (isWeb) { if (isWeb || typeof require === 'undefined' || typeof require.__$__nodeRequire !== 'function') {
// Built time configuration (do NOT modify) // Built time configuration (do NOT modify)
product = { /*BUILD->INSERT_PRODUCT_CONFIGURATION*/ } as IProductConfiguration; product = { /*BUILD->INSERT_PRODUCT_CONFIGURATION*/ } as IProductConfiguration;
...@@ -21,10 +21,17 @@ if (isWeb) { ...@@ -21,10 +21,17 @@ if (isWeb) {
if (Object.keys(product).length === 0) { if (Object.keys(product).length === 0) {
Object.assign(product, { Object.assign(product, {
version: '1.50.0-dev', version: '1.50.0-dev',
nameLong: 'Visual Studio Code Web Dev', nameShort: isWeb ? 'Code Web - OSS Dev' : 'Code - OSS Dev',
nameShort: 'VSCode Web Dev', nameLong: isWeb ? 'Code Web - OSS Dev' : 'Code - OSS Dev',
applicationName: 'code-oss',
dataFolderName: '.vscode-oss',
urlProtocol: 'code-oss', urlProtocol: 'code-oss',
reportIssueUrl: 'https://github.com/Microsoft/vscode/issues/new',
licenseName: 'MIT',
licenseUrl: 'https://github.com/Microsoft/vscode/blob/master/LICENSE.txt',
extensionAllowedProposedApi: [ extensionAllowedProposedApi: [
'ms-vscode.vscode-js-profile-flame',
'ms-vscode.vscode-js-profile-table',
'ms-vscode.references-view', 'ms-vscode.references-view',
'ms-vscode.github-browser' 'ms-vscode.github-browser'
], ],
...@@ -32,8 +39,8 @@ if (isWeb) { ...@@ -32,8 +39,8 @@ if (isWeb) {
} }
} }
// Node: AMD loader // Native (non-sandboxed)
else if (typeof require !== 'undefined' && typeof require.__$__nodeRequire === 'function') { else {
// Obtain values from product.json and package.json // Obtain values from product.json and package.json
const rootPath = path.dirname(getPathFromAmdModule(require, '')); const rootPath = path.dirname(getPathFromAmdModule(require, ''));
...@@ -55,9 +62,4 @@ else if (typeof require !== 'undefined' && typeof require.__$__nodeRequire === ' ...@@ -55,9 +62,4 @@ else if (typeof require !== 'undefined' && typeof require.__$__nodeRequire === '
}); });
} }
// Unknown
else {
throw new Error('Unable to resolve product configuration');
}
export default product; export default product;
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册