This commit is contained in:
Rizky 2023-10-19 07:15:50 +00:00
parent 86c8f16aee
commit 093af3d3bc
3 changed files with 21 additions and 20 deletions

Binary file not shown.

View File

@ -50,7 +50,9 @@ export const ExternalDeploy = () => {
local.domains = res.domains;
local.deploys = res.deploys;
}
} catch (e) {}
} catch (e) {
console.log(p.site.api_url, e);
}
local.render();
})();
}, [p.site.api_url]);

View File

@ -4,27 +4,26 @@ import { Plugin, context } from "esbuild";
import { $ } from "execa";
import { removeAsync, writeAsync } from "fs-jetpack";
// await removeAsync(dir.path("app/static"));
// await removeAsync(dir.path("app/web/.parcel-cache"));
// await removeAsync(dir.path("app/static"));
await removeAsync(dir.path("app/web/.parcel-cache"));
await removeAsync(dir.path("app/static"));
// const args = [
// "node",
// dir.path("node_modules/.bin/parcel"),
// "build",
// "./src/index.tsx",
// // "--no-optimize",
// "--no-scope-hoist",
// "--dist-dir",
// dir.path(`app/static`),
// ];
const args = [
"node",
dir.path("node_modules/.bin/parcel"),
"build",
"./src/index.tsx",
// "--no-optimize",
"--no-scope-hoist",
"--dist-dir",
dir.path(`app/static`),
];
// const parcel = spawn({
// cmd: args,
// cwd: dir.path("app/web"),
// stdio: ["ignore", "inherit", "inherit"],
// });
// await parcel.exited;
const parcel = spawn({
cmd: args,
cwd: dir.path("app/web"),
stdio: ["ignore", "inherit", "inherit"],
});
await parcel.exited;
// listAsync(dir.path("app/static")).then(async (files) => {
// if (files) {