feat: apply patch after setting up subtree
This commit is contained in:
@@ -70,7 +70,7 @@ function fromLocal(extensionPath: string, forWeb: boolean): Stream {
|
||||
if (isWebPacked) {
|
||||
input = updateExtensionPackageJSON(input, (data: any) => {
|
||||
delete data.scripts;
|
||||
delete data.dependencies;
|
||||
// https://github.com/cdr/code-server/pull/2041#issuecomment-685910322
|
||||
delete data.devDependencies;
|
||||
if (data.main) {
|
||||
data.main = data.main.replace('/out/', /dist/);
|
||||
|
||||
@@ -4,13 +4,10 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as path from 'path';
|
||||
import * as fs from 'fs';
|
||||
|
||||
const root = path.dirname(path.dirname(__dirname));
|
||||
const yarnrcPath = path.join(root, 'remote', '.yarnrc');
|
||||
const yarnrc = fs.readFileSync(yarnrcPath, 'utf8');
|
||||
const version = /^target\s+"([^"]+)"$/m.exec(yarnrc)![1];
|
||||
const version = process.versions.node;
|
||||
const node = process.platform === 'win32' ? 'node.exe' : 'node';
|
||||
const nodePath = path.join(root, '.build', 'node', `v${version}`, `${process.platform}-${process.arch}`, node);
|
||||
|
||||
console.log(nodePath);
|
||||
console.log(nodePath);
|
||||
|
||||
@@ -336,6 +336,7 @@ export function streamToPromise(stream: NodeJS.ReadWriteStream): Promise<void> {
|
||||
}
|
||||
|
||||
export function getElectronVersion(): string {
|
||||
return process.versions.node;
|
||||
const yarnrc = fs.readFileSync(path.join(root, '.yarnrc'), 'utf8');
|
||||
const target = /^target "(.*)"$/m.exec(yarnrc)![1];
|
||||
return target;
|
||||
|
||||
Reference in New Issue
Block a user