Skip to content

Commit

Permalink
feat: upgrade waline & ssg build
Browse files Browse the repository at this point in the history
  • Loading branch information
YunYouJun committed Sep 12, 2024
1 parent 3370cc5 commit 32a0424
Show file tree
Hide file tree
Showing 34 changed files with 1,907 additions and 658 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
1 change: 0 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
shamefully-hoist=true
registry=https://registry.npmmirror.com/
1 change: 0 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"lokalise.i18n-ally",
"antfu.iconify",
"dbaeumer.vscode-eslint",
"voorjaar.windicss-intellisense",
"csstools.postcss"
]
}
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM node:20-alpine as build-stage

WORKDIR /app
RUN corepack enable

COPY .npmrc package.json pnpm-lock.yaml ./
RUN --mount=type=cache,id=pnpm-store,target=/root/.pnpm-store \
pnpm install --frozen-lockfile

COPY . .
RUN pnpm build

FROM nginx:stable-alpine as production-stage

COPY --from=build-stage /app/dist /usr/share/nginx/html
EXPOSE 80

CMD ["nginx", "-g", "daemon off;"]
1 change: 1 addition & 0 deletions config/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const markdownWrapperClasses = ['markdown-body', 'el-bg-overlay', 'p-4', 'lt-md:px-2', 'm-auto', 'text-left', 'max-w-800px']
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
})()
</script>
</head>
<body>
<body class="font-sans">
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
<noscript> This website requires JavaScript to function properly. Please enable JavaScript to continue. </noscript>
</body>
</html>
1 change: 1 addition & 0 deletions locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ error:
password: The password can not be less than 6 digits

dashboard:
title: Dashboard
author: Author
content: Content
time: Time
Expand Down
32 changes: 23 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"url": "https://github.com/YunYouJun/kotodama"
},
"scripts": {
"build": "vite build",
"build": "npm run build:ssg",
"build:ssg": "cross-env NODE_ENV=production vite-ssg build",
"dev": "vite --port 3333 --open",
"lint": "eslint .",
Expand All @@ -24,6 +24,7 @@
"typecheck": "vue-tsc --noEmit"
},
"dependencies": {
"@unhead/vue": "^1.11.2",
"@vueuse/core": "^11.0.3",
"@vueuse/head": "^2.0.0",
"axios": "^1.7.7",
Expand All @@ -34,52 +35,65 @@
"prism-theme-vars": "^0.2.5",
"ua-parser-js": "^1.0.38",
"vue": "^3.5.4",
"vue-demi": "^0.14.10",
"vue-i18n": "^10.0.1",
"vue-router": "^4.4.4"
},
"devDependencies": {
"@antfu/eslint-config": "^3.5.1",
"@antfu/eslint-config": "^3.6.0",
"@iconify-json/carbon": "^1.2.1",
"@iconify-json/logos": "^1.2.0",
"@iconify-json/mdi": "^1.2.0",
"@iconify-json/ri": "^1.2.0",
"@iconify-json/simple-icons": "^1.2.2",
"@intlify/unplugin-vue-i18n": "^5.0.0",
"@shikijs/markdown-it": "^1.17.0",
"@types/markdown-it-link-attributes": "^3.0.5",
"@types/marked": "^6.0.0",
"@types/md5": "^2.3.5",
"@types/node": "^22.5.4",
"@types/nprogress": "^0.2.3",
"@types/ua-parser-js": "^0.7.39",
"@unocss/eslint-plugin": "^0.62.3",
"@vitejs/plugin-vue": "^5.1.3",
"@waline/client": "^2.15.8",
"@waline/client": "^3.3.1",
"critters": "^0.0.24",
"cross-env": "^7.0.3",
"element-plus": "2.8.2",
"eslint": "^9.10.0",
"eslint-plugin-format": "^0.1.2",
"https-localhost": "^4.7.1",
"lint-staged": "^15.2.10",
"markdown-it-link-attributes": "^4.0.1",
"markdown-it-prism": "^2.3.0",
"marked": "^14.1.2",
"patch-vue-directive-ssr": "^0.0.1",
"pnpm": "^9.10.0",
"sass": "^1.78.0",
"simple-git-hooks": "^2.11.1",
"star-markdown-css": "^0.5.1",
"typescript": "^5.5.4",
"typescript": "5.5.4",
"unocss": "^0.62.3",
"unplugin-auto-import": "^0.18.2",
"unplugin-auto-import": "^0.18.3",
"unplugin-vue-components": "^0.27.4",
"unplugin-vue-markdown": "^0.26.2",
"unplugin-vue-router": "^0.10.8",
"vite": "^5.4.4",
"vite-plugin-inspect": "^0.8.7",
"vite-plugin-pages": "^0.32.3",
"vite-plugin-pwa": "^0.20.5",
"vite-plugin-vue-devtools": "^7.4.5",
"vite-plugin-vue-layouts": "^0.11.0",
"vite-ssg": "0.22.1",
"vite-ssg": "0.23.8",
"vite-ssg-sitemap": "^0.8.1",
"vitest": "^2.1.0",
"vue-recaptcha": "^2.0.3",
"vue-tsc": "^2.1.6"
},
"resolutions": {
"@typescript-eslint/utils": "^8.5.0"
},
"simple-git-hooks": {
"pre-commit": "pnpm lint-staged"
},
"lint-staged": {
"*": "eslint --fix"
}
}
Loading

0 comments on commit 32a0424

Please sign in to comment.