Add support for (optional) GITHUB_TOKEN env variable
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
/*
|
||||
* SPDX-License-Identifier: GPL-3.0
|
||||
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
|
||||
* Copyright (c) 2023 Vendicated and Vencord contributors
|
||||
*/
|
||||
|
||||
import { BuildContext, BuildOptions, context } from "esbuild";
|
||||
|
||||
const isDev = process.argv.includes("--dev");
|
||||
@@ -55,8 +61,10 @@ const watch = process.argv.includes("--watch");
|
||||
if (watch) {
|
||||
await Promise.all(contexts.map(ctx => ctx.watch()));
|
||||
} else {
|
||||
await Promise.all(contexts.map(async ctx => {
|
||||
await ctx.rebuild();
|
||||
await ctx.dispose();
|
||||
}));
|
||||
await Promise.all(
|
||||
contexts.map(async ctx => {
|
||||
await ctx.rebuild();
|
||||
await ctx.dispose();
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
/*
|
||||
* SPDX-License-Identifier: GPL-3.0
|
||||
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
|
||||
* Copyright (c) 2023 Vendicated and Vencord contributors
|
||||
*/
|
||||
|
||||
export const VencordFragment = /* #__PURE__*/ Symbol.for("react.fragment");
|
||||
export let VencordCreateElement =
|
||||
(...args) => (VencordCreateElement = Vencord.Webpack.Common.React.createElement)(...args);
|
||||
export let VencordCreateElement = (...args) =>
|
||||
(VencordCreateElement = Vencord.Webpack.Common.React.createElement)(...args);
|
||||
|
||||
11
scripts/start.ts
Normal file
11
scripts/start.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
* SPDX-License-Identifier: GPL-3.0
|
||||
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
|
||||
* Copyright (c) 2023 Vendicated and Vencord contributors
|
||||
*/
|
||||
|
||||
import "./utils/dotenv";
|
||||
|
||||
import { spawnNodeModuleBin } from "./utils/spawn.mjs";
|
||||
|
||||
spawnNodeModuleBin("electron", ["."]);
|
||||
@@ -1,15 +1,10 @@
|
||||
import { spawn as cpSpawn, SpawnOptions } from "child_process";
|
||||
import { join } from "path";
|
||||
/*
|
||||
* SPDX-License-Identifier: GPL-3.0
|
||||
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
|
||||
* Copyright (c) 2023 Vendicated and Vencord contributors
|
||||
*/
|
||||
|
||||
const EXT = process.platform === "win32" ? ".cmd" : "";
|
||||
import "./start";
|
||||
|
||||
const OPTS: SpawnOptions = {
|
||||
stdio: "inherit",
|
||||
};
|
||||
|
||||
function spawn(bin: string, args: string[]) {
|
||||
cpSpawn(join("node_modules", ".bin", bin + EXT), args, OPTS);
|
||||
}
|
||||
|
||||
spawn("tsx", ["scripts/build/build.mts", "--", "--watch", "--dev"]);
|
||||
spawn("electron", ["."]);
|
||||
import { spawnNodeModuleBin } from "./utils/spawn.mjs";
|
||||
spawnNodeModuleBin("tsx", ["scripts/build/build.mts", "--", "--watch", "--dev"]);
|
||||
|
||||
9
scripts/utils/dotenv.ts
Normal file
9
scripts/utils/dotenv.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/*
|
||||
* SPDX-License-Identifier: GPL-3.0
|
||||
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
|
||||
* Copyright (c) 2023 Vendicated and Vencord contributors
|
||||
*/
|
||||
|
||||
import { config } from "dotenv";
|
||||
|
||||
config();
|
||||
18
scripts/utils/spawn.mts
Normal file
18
scripts/utils/spawn.mts
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* SPDX-License-Identifier: GPL-3.0
|
||||
* Vencord Desktop, a desktop app aiming to give you a snappier Discord Experience
|
||||
* Copyright (c) 2023 Vendicated and Vencord contributors
|
||||
*/
|
||||
|
||||
import { spawn as spaaawn, SpawnOptions } from "child_process";
|
||||
import { join } from "path";
|
||||
|
||||
const EXT = process.platform === "win32" ? ".cmd" : "";
|
||||
|
||||
const OPTS: SpawnOptions = {
|
||||
stdio: "inherit"
|
||||
};
|
||||
|
||||
export function spawnNodeModuleBin(bin: string, args: string[]) {
|
||||
spaaawn(join("node_modules", ".bin", bin + EXT), args, OPTS);
|
||||
}
|
||||
Reference in New Issue
Block a user