remove cross-spawn

This commit is contained in:
JeanOUINA 2021-04-29 16:21:11 +02:00
parent 0367814ebe
commit ee4e1a5ba5
No known key found for this signature in database
GPG Key ID: 7387E30D642FF8B7
7 changed files with 1625 additions and 980 deletions

View File

@ -5464,10 +5464,8 @@
"integrity": "sha512-aWAgTW4MoSJzZPAicljkO1hsi1oKj/RRq/OJQh2PKI2UKL04c2Bs+MBOB+BBABHTXJpf9mCwHN7ANCvYsvY2sg==",
"dev": true,
"dependencies": {
"chokidar": "^3.4.1",
"graceful-fs": "^4.1.2",
"neo-async": "^2.5.0",
"watchpack-chokidar2": "^2.0.0"
"neo-async": "^2.5.0"
},
"optionalDependencies": {
"chokidar": "^3.4.1",

View File

@ -3471,7 +3471,6 @@
"minimist": "^1.2.5",
"neo-async": "^2.6.0",
"source-map": "^0.6.1",
"uglify-js": "^3.1.4",
"wordwrap": "^1.0.0"
},
"bin": {
@ -6731,10 +6730,8 @@
"integrity": "sha512-ymVbbQP40MFTp+cNMvpyBpBtygHnPzPkHqoIwRRj/0B8KhqQwV8LaKjtbaxF2lK4vl8zN9wCxS46IFCU5K4W0g==",
"dev": true,
"dependencies": {
"chokidar": "^3.4.0",
"graceful-fs": "^4.1.2",
"neo-async": "^2.5.0",
"watchpack-chokidar2": "^2.0.0"
"neo-async": "^2.5.0"
},
"optionalDependencies": {
"chokidar": "^3.4.0",

View File

@ -690,6 +690,11 @@
"safer-buffer": "^2.0.2",
"tweetnacl": "~0.14.0"
},
"bin": {
"sshpk-conv": "bin/sshpk-conv",
"sshpk-sign": "bin/sshpk-sign",
"sshpk-verify": "bin/sshpk-verify"
},
"engines": {
"node": ">=0.10.0"
}

View File

@ -238,9 +238,6 @@
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/inherits": {

2569
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -44,9 +44,8 @@
"@types/uuid": "^8.0.0",
"@types/yauzl": "^2.9.1",
"asar": "^3.0.3",
"cross-spawn": "^7.0.3",
"dotenv": "^8.2.0",
"electron": "^9.3.1",
"electron": "^9.4.4",
"electron-builder": "^22.8.0",
"fast-glob": "^3.2.4",
"fs-extra": "^9.0.1",

View File

@ -3,14 +3,12 @@ const { join } = require("path")
const PROJECT_DIRNAME=join(__dirname, "..")
const child_process = require("child_process")
let env = process.env
function spawnProcess(cmd, ...args) {
const postfix = cmd === "node" ? ".exe" : ".cmd"
cmd = process.platform === "win32" ? cmd + postfix : cmd
let result = child_process.spawnSync(cmd, args, {
cwd: PROJECT_DIRNAME,
env: env,
env: process.env,
stdio: "inherit"
})
if (result.error){
@ -21,18 +19,12 @@ function spawnProcess(cmd, ...args) {
}
}
let result;
spawnProcess("npm", "rm", "electron")
spawnProcess("npm", "i")
if (process.platform === "win32"){
result = spawnProcess("npm", "i", "--save-dev", "--arch=ia32", "electron@9")
} else {
result = spawnProcess("npm", "i", "--save-dev", "--arch=x64", "electron@9")
}
let runString = "`npm test`"
const arch = process.platform === "win32" ? "ia32" : "x64"
spawnProcess("npm", "i", "--save-dev", "--arch="+arch, "electron@9")
spawnProcess("node", join(PROJECT_DIRNAME, "scripts", "installSubModules.js"))
console.log("Everything is installed. You should be able to do "+runString+" to compile everything and launch.")
console.log("Everything is installed. You should be able to do `npm test` to compile everything and launch.")