refactor: delete remaining .ts files 😱
This commit is contained in:
parent
465cde6ea1
commit
a90bc0133e
2 changed files with 0 additions and 36 deletions
|
@ -1,10 +0,0 @@
|
||||||
import { NitroApp } from "nitropack";
|
|
||||||
import config from "../app/mcfly.config";
|
|
||||||
|
|
||||||
export default defineNitroPlugin((event: NitroApp) => {
|
|
||||||
const { onBuild } = config();
|
|
||||||
if (onBuild?.length > 0)
|
|
||||||
onBuild.forEach((callBack) => {
|
|
||||||
callBack(event);
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,26 +0,0 @@
|
||||||
import { existsSync, promises as fsp } from "node:fs";
|
|
||||||
|
|
||||||
export default function setUpSsr() {
|
|
||||||
return async () => {
|
|
||||||
if (!existsSync("./routes")) {
|
|
||||||
await fsp.mkdir("./routes");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!existsSync("./routes/[...index].ts"))
|
|
||||||
try {
|
|
||||||
fsp.copyFile(
|
|
||||||
"./packages/assets/mcfly-ssr.ts",
|
|
||||||
"./routes/[...index].ts"
|
|
||||||
);
|
|
||||||
console.log("SSR set up successfully!");
|
|
||||||
} catch (err) {
|
|
||||||
if (err) {
|
|
||||||
console.log("Error Found:", err);
|
|
||||||
} else {
|
|
||||||
// Get the current filenames
|
|
||||||
// after the function
|
|
||||||
console.log("SSR set up successfully!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Reference in a new issue