mirror of
https://github.com/Lightcord/Lightcord.git
synced 2025-04-12 00:55:40 +02:00
remove cross-spawn
This commit is contained in:
parent
0bd5d289d4
commit
0367814ebe
@ -1,4 +1,4 @@
|
||||
const spawn = require("cross-spawn")
|
||||
const child_process = require("child_process")
|
||||
const path = require("path")
|
||||
const { existsSync, promises: fsPromises, createWriteStream } = require("fs")
|
||||
const yazl = require("yazl")
|
||||
@ -121,7 +121,8 @@ switch(process.platform){
|
||||
|
||||
function awaitExec(command, args = []){
|
||||
return new Promise((resolve, reject) => {
|
||||
const child = spawn.spawn(command, args, {
|
||||
if(process.platform === "win32")command += ".cmd"
|
||||
const child = child_process.spawn(command, args, {
|
||||
env: process.env,
|
||||
cwd: process.cwd(),
|
||||
stdio: "inherit"
|
||||
|
@ -1,7 +1,11 @@
|
||||
const spawn = require("cross-spawn")
|
||||
const { mkdirSync, existsSync } = require("fs")
|
||||
const { join, resolve } = require("path")
|
||||
const child_process = require("child_process")
|
||||
|
||||
const spawn = (...args) => {
|
||||
if(process.platform === "win32")args[0] += ".cmd"
|
||||
return child_process.spawnSync(...args)
|
||||
}
|
||||
|
||||
const PROJECT_DIR = resolve(__dirname, "..");
|
||||
/** Main Project */
|
||||
|
@ -25,14 +25,14 @@ let result;
|
||||
spawnProcess("npm", "rm", "electron")
|
||||
spawnProcess("npm", "i")
|
||||
if (process.platform === "win32"){
|
||||
result = spawnProcess("npm", "i", "--save-dev", "--arch=ia32", "electron@9.3.1")
|
||||
result = spawnProcess("npm", "i", "--save-dev", "--arch=ia32", "electron@9")
|
||||
} else {
|
||||
result = spawnProcess("npm", "i", "--save-dev", "--arch=x64", "electron@9.3.1")
|
||||
result = spawnProcess("npm", "i", "--save-dev", "--arch=x64", "electron@9")
|
||||
}
|
||||
|
||||
let runString = "`npm test`"
|
||||
|
||||
spawnProcess("node", join(PROJECT_DIRNAME,"scripts", "installSubModules.js"))
|
||||
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.")
|
Loading…
x
Reference in New Issue
Block a user