remove fallback from package.ts and product.ts
This commit is contained in:
parent
195e77304b
commit
ecd39ef3c1
|
@ -11,16 +11,6 @@ export interface IPackageConfiguration {
|
|||
version: string;
|
||||
}
|
||||
|
||||
let pkg: IPackageConfiguration;
|
||||
try {
|
||||
const rootPath = path.dirname(uri.parse(require.toUrl('')).fsPath);
|
||||
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;
|
||||
const rootPath = path.dirname(uri.parse(require.toUrl('')).fsPath);
|
||||
const packageJsonPath = path.join(rootPath, 'package.json');
|
||||
export default require.__$__nodeRequire(packageJsonPath) as IPackageConfiguration;
|
|
@ -47,18 +47,9 @@ export interface IProductConfiguration {
|
|||
npsSurveyUrl: string;
|
||||
}
|
||||
|
||||
let product: IProductConfiguration;
|
||||
try {
|
||||
const rootPath = path.dirname(uri.parse(require.toUrl('')).fsPath);
|
||||
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'
|
||||
};
|
||||
}
|
||||
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';
|
||||
|
|
|
@ -79,11 +79,11 @@ function main() {
|
|||
var loaderConfig = {
|
||||
nodeRequire: require,
|
||||
nodeMain: __filename,
|
||||
baseUrl: path.join(path.dirname(__dirname)),
|
||||
baseUrl: path.join(path.dirname(__dirname), 'src'),
|
||||
paths: {
|
||||
'vs': out + '/vs',
|
||||
'lib': out + '/lib',
|
||||
'bootstrap': out + '/bootstrap'
|
||||
'vs': `../${ out }/vs`,
|
||||
'lib': `../${ out }/lib`,
|
||||
'bootstrap': `../${ out }/bootstrap`
|
||||
},
|
||||
catchError: true
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue