mirror of
https://github.com/Equicord/Equicord.git
synced 2025-01-31 03:33:36 -05:00
Update build.mts
This commit is contained in:
parent
cbeae59205
commit
3d10db639c
1 changed files with 3 additions and 4 deletions
|
@ -22,7 +22,6 @@ import { BuildOptions, Plugin } from "esbuild";
|
||||||
import { existsSync, readdirSync } from "fs";
|
import { existsSync, readdirSync } from "fs";
|
||||||
import { readdir, rm, writeFile } from "fs/promises";
|
import { readdir, rm, writeFile } from "fs/promises";
|
||||||
import { join } from "path";
|
import { join } from "path";
|
||||||
import { pathToFileURL } from "url";
|
|
||||||
|
|
||||||
import { addBuild, BUILD_TIMESTAMP, buildOrWatchAll, commonOpts, exists, globPlugins, IS_DEV, IS_REPORTER, IS_STANDALONE, IS_UPDATER_DISABLED, resolvePluginName, VERSION, watch } from "@scripts/build/common.mts";
|
import { addBuild, BUILD_TIMESTAMP, buildOrWatchAll, commonOpts, exists, globPlugins, IS_DEV, IS_REPORTER, IS_STANDALONE, IS_UPDATER_DISABLED, resolvePluginName, VERSION, watch } from "@scripts/build/common.mts";
|
||||||
|
|
||||||
|
@ -71,13 +70,13 @@ const globNativesPlugin: Plugin = {
|
||||||
let natives = "\n";
|
let natives = "\n";
|
||||||
let i = 0;
|
let i = 0;
|
||||||
for (const dir of pluginDirs) {
|
for (const dir of pluginDirs) {
|
||||||
const dirPath = pathToFileURL(join("src", dir));
|
const dirPath = join("src", dir);
|
||||||
if (!await exists(dirPath)) continue;
|
if (!await exists(dirPath)) continue;
|
||||||
const plugins = await readdir(dirPath, { withFileTypes: true });
|
const plugins = await readdir(dirPath, { withFileTypes: true });
|
||||||
for (const file of plugins) {
|
for (const file of plugins) {
|
||||||
const fileName = file.name;
|
const fileName = file.name;
|
||||||
const nativePath = pathToFileURL(join(dirPath, fileName, "native.ts"));
|
const nativePath = join(dirPath, fileName, "native.ts");
|
||||||
const indexNativePath = pathToFileURL(join(dirPath, fileName, "native/index.ts"));
|
const indexNativePath = join(dirPath, fileName, "native/index.ts");
|
||||||
|
|
||||||
if (!(await exists(nativePath)) && !(await exists(indexNativePath)))
|
if (!(await exists(nativePath)) && !(await exists(indexNativePath)))
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue