Bump tooling, add check script, remove templates
Upgrade developer toolchain and clean up project files: add a new "check" script (replacing previous lint/fmt), bump TypeScript and add @halo-dev/vite-plugin-halo-theme, update pnpm packageManager version, remove legacy templates HTML files and add "templates" to .gitignore, and apply related changes to vite.config.ts. The lockfile was updated to reflect dependency changes.
This commit is contained in:
@@ -26,3 +26,4 @@ dist-ssr
|
|||||||
|
|
||||||
.gradle
|
.gradle
|
||||||
build
|
build
|
||||||
|
templates
|
||||||
+5
-5
@@ -4,18 +4,18 @@
|
|||||||
"build": "tsc && vp build && theme-package",
|
"build": "tsc && vp build && theme-package",
|
||||||
"build-only": "tsc && vp build",
|
"build-only": "tsc && vp build",
|
||||||
"dev": "vp build --watch",
|
"dev": "vp build --watch",
|
||||||
"lint": "vp lint",
|
"check": "vp check --fix",
|
||||||
"prepare": "vp config",
|
"prepare": "vp config"
|
||||||
"fmt": "vp fmt"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@halo-dev/theme-package-cli": "^1.0.1",
|
"@halo-dev/theme-package-cli": "^1.0.1",
|
||||||
|
"@halo-dev/vite-plugin-halo-theme": "^1.0.3",
|
||||||
"@types/node": "18.11.9",
|
"@types/node": "18.11.9",
|
||||||
"typescript": "^4.9.5",
|
"typescript": "^5.9.3",
|
||||||
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
|
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
|
||||||
"vite-plus": "latest"
|
"vite-plus": "latest"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@10.32.1",
|
"packageManager": "pnpm@10.33.0",
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"onlyBuiltDependencies": [
|
"onlyBuiltDependencies": [
|
||||||
"esbuild"
|
"esbuild"
|
||||||
|
|||||||
Generated
+564
-256
File diff suppressed because it is too large
Load Diff
@@ -1,13 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html
|
|
||||||
xmlns:th="https://www.thymeleaf.org"
|
|
||||||
th:replace="~{modules/layout :: html(content = ~{::content})}"
|
|
||||||
>
|
|
||||||
<th:block th:fragment="content">
|
|
||||||
<ul>
|
|
||||||
<li th:each="post : ${posts.items}">
|
|
||||||
<a th:text="${post.spec.title}" th:href="${post.status.permalink}"></a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</th:block>
|
|
||||||
</html>
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html lang="en" th:fragment="html (content)">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8" />
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
||||||
<title th:text="${site.title}"></title>
|
|
||||||
<link rel="stylesheet" th:href="@{/assets/dist/style.css}" href="./assets/dist/style.css" />
|
|
||||||
<script th:src="@{/assets/dist/main.iife.js}"></script>
|
|
||||||
</head>
|
|
||||||
<body th:style="'background-color: '+${theme.config.styles.background_color}">
|
|
||||||
<th:block th:replace="${content}" />
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html
|
|
||||||
xmlns:th="https://www.thymeleaf.org"
|
|
||||||
th:replace="~{modules/layout :: html(content = ~{::content})}"
|
|
||||||
>
|
|
||||||
<th:block th:fragment="content">
|
|
||||||
<article th:utext="${post.content.content}"></article>
|
|
||||||
</th:block>
|
|
||||||
</html>
|
|
||||||
+3
-13
@@ -1,19 +1,8 @@
|
|||||||
import path from "path";
|
import { haloThemePlugin } from "@halo-dev/vite-plugin-halo-theme";
|
||||||
import { fileURLToPath } from "url";
|
|
||||||
|
|
||||||
import { defineConfig } from "vite-plus";
|
import { defineConfig } from "vite-plus";
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
build: {
|
plugins: [haloThemePlugin()],
|
||||||
outDir: fileURLToPath(new URL("./templates/assets/dist", import.meta.url)),
|
|
||||||
emptyOutDir: true,
|
|
||||||
lib: {
|
|
||||||
entry: path.resolve(process.cwd(), "src/main.ts"),
|
|
||||||
name: "main",
|
|
||||||
fileName: "main",
|
|
||||||
formats: ["iife"],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
lint: { options: { typeAware: true, typeCheck: true } },
|
lint: { options: { typeAware: true, typeCheck: true } },
|
||||||
fmt: {
|
fmt: {
|
||||||
printWidth: 100,
|
printWidth: 100,
|
||||||
@@ -23,6 +12,7 @@ export default defineConfig({
|
|||||||
sortPackageJson: true,
|
sortPackageJson: true,
|
||||||
insertFinalNewline: true,
|
insertFinalNewline: true,
|
||||||
sortImports: {},
|
sortImports: {},
|
||||||
|
sortTailwindcss: {},
|
||||||
ignorePatterns: [],
|
ignorePatterns: [],
|
||||||
},
|
},
|
||||||
staged: {
|
staged: {
|
||||||
|
|||||||
Reference in New Issue
Block a user