2020-06-27 21:02:48 +02:00
|
|
|
const spawn = require("cross-spawn")
|
|
|
|
const { join } = require("path")
|
|
|
|
|
|
|
|
/** Main Project */
|
|
|
|
spawnSync("tsc")
|
|
|
|
/** BetterDiscord */
|
|
|
|
spawnSync("npm run build-prod", join(__dirname, "BetterDiscordApp"))
|
|
|
|
spawnSync("npm run build", join(__dirname, "BetterDiscordApp"))
|
|
|
|
spawnSync("npm run minify-css", join(__dirname, "BetterDiscordApp"))
|
|
|
|
/** DiscordJS */
|
|
|
|
spawnSync("npm run build", join(__dirname, "DiscordJS"))
|
|
|
|
/** LightcordApi */
|
|
|
|
spawnSync("npm run build", join(__dirname, "LightcordApi"))
|
|
|
|
spawnSync("npm run build-prod", join(__dirname, "LightcordApi"))
|
|
|
|
spawnSync("tsc", join(__dirname, "LightcordApi"))
|
|
|
|
|
|
|
|
|
|
|
|
function spawnSync(args, cwd){
|
|
|
|
args = args.split(" ")
|
|
|
|
let command = args.shift()
|
|
|
|
return spawn(command, args, {
|
|
|
|
cwd: cwd || process.cwd(),
|
|
|
|
env: process.env,
|
|
|
|
stdio: "inherit"
|
2020-06-06 02:12:40 +02:00
|
|
|
})
|
2020-05-16 23:24:51 +02:00
|
|
|
}
|
2020-06-27 21:02:48 +02:00
|
|
|
|
|
|
|
process.on("beforeExit", () => {
|
|
|
|
console.log(`Exiting compilation`)
|
|
|
|
})
|