remove fallback from package.ts and product.ts
This commit is contained in:
parent
195e77304b
commit
ecd39ef3c1
3 changed files with 10 additions and 29 deletions
|
@ -11,16 +11,6 @@ export interface IPackageConfiguration {
|
||||||
version: string;
|
version: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
let pkg: IPackageConfiguration;
|
const rootPath = path.dirname(uri.parse(require.toUrl('')).fsPath);
|
||||||
try {
|
const packageJsonPath = path.join(rootPath, 'package.json');
|
||||||
const rootPath = path.dirname(uri.parse(require.toUrl('')).fsPath);
|
export default require.__$__nodeRequire(packageJsonPath) as IPackageConfiguration;
|
||||||
const packageJsonPath = path.join(rootPath, 'package.json');
|
|
||||||
pkg = require.__$__nodeRequire(packageJsonPath) as IPackageConfiguration;
|
|
||||||
} catch (error) {
|
|
||||||
pkg = {
|
|
||||||
name: 'code-oss-dev',
|
|
||||||
version: '1.x.x'
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export default pkg;
|
|
|
@ -47,18 +47,9 @@ export interface IProductConfiguration {
|
||||||
npsSurveyUrl: string;
|
npsSurveyUrl: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
let product: IProductConfiguration;
|
const rootPath = path.dirname(uri.parse(require.toUrl('')).fsPath);
|
||||||
try {
|
const productJsonPath = path.join(rootPath, 'product.json');
|
||||||
const rootPath = path.dirname(uri.parse(require.toUrl('')).fsPath);
|
const product = require.__$__nodeRequire(productJsonPath) as IProductConfiguration;
|
||||||
const productJsonPath = path.join(rootPath, 'product.json');
|
|
||||||
product = require.__$__nodeRequire(productJsonPath) as IProductConfiguration;
|
|
||||||
} catch (error) {
|
|
||||||
product = <IProductConfiguration>{
|
|
||||||
nameLong: 'Code - OSS',
|
|
||||||
applicationName: 'code-oss',
|
|
||||||
dataFolderName: '.vscode-oss'
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (process.env['VSCODE_DEV']) {
|
if (process.env['VSCODE_DEV']) {
|
||||||
product.nameShort += ' Dev';
|
product.nameShort += ' Dev';
|
||||||
|
|
|
@ -79,11 +79,11 @@ function main() {
|
||||||
var loaderConfig = {
|
var loaderConfig = {
|
||||||
nodeRequire: require,
|
nodeRequire: require,
|
||||||
nodeMain: __filename,
|
nodeMain: __filename,
|
||||||
baseUrl: path.join(path.dirname(__dirname)),
|
baseUrl: path.join(path.dirname(__dirname), 'src'),
|
||||||
paths: {
|
paths: {
|
||||||
'vs': out + '/vs',
|
'vs': `../${ out }/vs`,
|
||||||
'lib': out + '/lib',
|
'lib': `../${ out }/lib`,
|
||||||
'bootstrap': out + '/bootstrap'
|
'bootstrap': `../${ out }/bootstrap`
|
||||||
},
|
},
|
||||||
catchError: true
|
catchError: true
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue