move to code

This commit is contained in:
Joao Moreno
2016-05-02 14:46:36 +02:00
parent ea7600eca8
commit 8aeb918803
7 changed files with 5 additions and 5 deletions
+15
View File
@@ -0,0 +1,15 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as path from 'path';
import uri from 'vs/base/common/uri';
export interface IPackageConfiguration {
version: string;
}
const rootPath = path.dirname(uri.parse(require.toUrl('')).fsPath);
const packageJsonPath = path.join(rootPath, 'package.json');
export default require.__$__nodeRequire(packageJsonPath) as IPackageConfiguration;
+58
View File
@@ -0,0 +1,58 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as path from 'path';
import uri from 'vs/base/common/uri';
export interface IProductConfiguration {
nameShort: string;
nameLong: string;
applicationName: string;
win32AppUserModelId: string;
win32MutexName: string;
darwinBundleIdentifier: string;
dataFolderName: string;
downloadUrl: string;
updateUrl?: string;
quality?: string;
commit: string;
date: string;
extensionsGallery: {
serviceUrl: string;
cacheUrl: string;
itemUrl: string;
};
extensionTips: { [id: string]: string; };
crashReporter: Electron.CrashReporterStartOptions;
welcomePage: string;
enableTelemetry: boolean;
aiConfig: {
key: string;
asimovKey: string;
};
sendASmile: {
reportIssueUrl: string,
requestFeatureUrl: string
};
documentationUrl: string;
releaseNotesUrl: string;
twitterUrl: string;
requestFeatureUrl: string;
reportIssueUrl: string;
licenseUrl: string;
privacyStatementUrl: string;
}
const rootPath = path.dirname(uri.parse(require.toUrl('')).fsPath);
const productJsonPath = path.join(rootPath, 'product.json');
const product = require.__$__nodeRequire(productJsonPath) as IProductConfiguration;
if (process.env['VSCODE_DEV']) {
product.nameShort += ' Dev';
product.nameLong += ' Dev';
product.dataFolderName += '-dev';
}
export default product;