2022-11-10 15:06:08 +01:00
|
|
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
|
|
const concurrently = require("concurrently");
|
|
|
|
const rimraf = require("rimraf");
|
|
|
|
|
|
|
|
const args = process.argv.splice(2);
|
|
|
|
|
|
|
|
rimraf.sync("build");
|
|
|
|
|
|
|
|
concurrently(
|
|
|
|
[
|
|
|
|
{
|
|
|
|
name: "Main",
|
|
|
|
command: "npm run build:main:watch",
|
|
|
|
prefixColor: "yellow",
|
|
|
|
},
|
2023-10-12 11:50:17 +02:00
|
|
|
{
|
|
|
|
name: "Prel",
|
|
|
|
command: "npm run build:preload:watch",
|
|
|
|
prefixColor: "magenta",
|
|
|
|
},
|
2022-11-10 15:06:08 +01:00
|
|
|
{
|
|
|
|
name: "Rend",
|
|
|
|
command: "npm run build:renderer:watch",
|
|
|
|
prefixColor: "cyan",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "Elec",
|
|
|
|
command: `npx wait-on ./build/main.js && npx electron --inspect=5858 ${args.join(
|
2023-11-29 22:15:20 +01:00
|
|
|
" ",
|
2022-11-10 15:06:08 +01:00
|
|
|
)} ./build --watch`,
|
|
|
|
prefixColor: "green",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
{
|
|
|
|
prefix: "name",
|
|
|
|
outputStream: process.stdout,
|
|
|
|
killOthers: ["success", "failure"],
|
2023-11-29 22:15:20 +01:00
|
|
|
},
|
2022-11-10 15:06:08 +01:00
|
|
|
);
|