mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
Cleanup bootstrap files (#58171)
* bootstrap - first cut
* bootstrap => bootstrap-fork, bootstrap-shared => bootstrap
* bootstrap - extract uriFromPath()
* bootstrap - extract readfile/writefile
* bootstrap - share more code when loading renderers
* boostrap-electron-browser => bootstrap-window
* bootstrap - cleanup main.js
* bootstrap - handle index.js
* bootstrap 💄
This commit is contained in:
@@ -13,6 +13,7 @@ const minimatch = require('minimatch');
|
||||
const istanbul = require('istanbul');
|
||||
const i_remap = require('remap-istanbul/lib/remap');
|
||||
const util = require('util');
|
||||
const bootstrap = require('../../src/bootstrap');
|
||||
|
||||
// Disabled custom inspect. See #38847
|
||||
if (util.inspect && util.inspect['defaultOptions']) {
|
||||
@@ -23,15 +24,6 @@ let _tests_glob = '**/test/**/*.test.js';
|
||||
let loader;
|
||||
let _out;
|
||||
|
||||
function uriFromPath(_path) {
|
||||
var pathName = path.resolve(_path).replace(/\\/g, '/');
|
||||
if (pathName.length > 0 && pathName.charAt(0) !== '/') {
|
||||
pathName = '/' + pathName;
|
||||
}
|
||||
|
||||
return encodeURI('file://' + pathName).replace(/#/g, '%23');
|
||||
}
|
||||
|
||||
function initLoader(opts) {
|
||||
let outdir = opts.build ? 'out-build' : 'out';
|
||||
_out = path.join(__dirname, `../../${outdir}`);
|
||||
@@ -42,11 +34,11 @@ function initLoader(opts) {
|
||||
nodeRequire: require,
|
||||
nodeMain: __filename,
|
||||
catchError: true,
|
||||
baseUrl: uriFromPath(path.join(__dirname, '../../src')),
|
||||
baseUrl: bootstrap.uriFromPath(path.join(__dirname, '../../src')),
|
||||
paths: {
|
||||
'vs': `../${outdir}/vs`,
|
||||
'lib': `../${outdir}/lib`,
|
||||
'bootstrap': `../${outdir}/bootstrap`
|
||||
'bootstrap-fork': `../${outdir}/bootstrap-fork`
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user