Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
连远生 committed Sep 4, 2024
1 parent 3f7778a commit 9b68672
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
Binary file modified .DS_Store
Binary file not shown.
13 changes: 12 additions & 1 deletion app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,18 @@

<script setup>
import { createResponsiveSizeCtx } from "~/utils/window-size";
createResponsiveSizeCtx();
useHead({
link: [
{
rel: "icon",
href: "/avatar.webp",
type: "image/webp",
},
],
});
</script>

<style lang="postcss">
Expand All @@ -14,4 +25,4 @@ createResponsiveSizeCtx();
color: theme("textColor.accent-content");
background-color: theme("textColor.accent");
}
</style>
</style>
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"scripts": {
"dev": "nuxt dev",
"build": "nuxi generate",
"build-cp": "nuxi generate && rm -rf /dist/images",
"serve": "pnpm dlx serve -p 8080 ./.output/public",
"clean": "rm -rf public/images && nuxi cleanup",
"prepare": "pnpm run clean && husky install && nuxi prepare",
Expand Down
Empty file removed scripts/build.mjs
Empty file.
8 changes: 3 additions & 5 deletions server/plugins/images.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,11 @@ export default defineNitroPlugin((nitroApp) => {
);

for (const [o, d] of arr) {
const r1 = await fs.stat(d).then(e => false).catch(e => true)
const r2 = await fs.stat(o).then(e => true).catch(e => false)
if (r1 && r2) {
if (await fs.stat(o).then(e => true).catch(e => false)) {
try {
await fs.symlink(o, d)
await fs.copyFile(o, d)
} catch (error) {
console.error(error)
console.log(`The file could not be copied: ${o} \n to \n ${d}`);
}
}
}
Expand Down

0 comments on commit 9b68672

Please sign in to comment.