@xingwangzhe/stalux 1.25.13 → 1.25.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +14 -14
- package/src/index.ts +2 -19
- package/src/internal/vite-aliases.ts +16 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xingwangzhe/stalux",
|
|
3
|
-
"version": "1.25.
|
|
3
|
+
"version": "1.25.15",
|
|
4
4
|
"description": "A powerful, modern Astro blog theme — use as template or install as plugin",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"astro",
|
|
@@ -85,39 +85,39 @@
|
|
|
85
85
|
"prepare": "git config core.hooksPath scripts/git-hooks"
|
|
86
86
|
},
|
|
87
87
|
"dependencies": {
|
|
88
|
-
"@astrojs/markdown-satteri": "0.
|
|
88
|
+
"@astrojs/markdown-satteri": "0.4.0",
|
|
89
89
|
"@astrojs/rss": "^4.0.19",
|
|
90
|
-
"@astrojs/sitemap": "^3.7.
|
|
91
|
-
"@expressive-code/plugin-line-numbers": "^0.44.
|
|
92
|
-
"@lucide/astro": "^1.
|
|
93
|
-
"@mcp-b/webmcp-polyfill": "^5.0
|
|
90
|
+
"@astrojs/sitemap": "^3.7.4",
|
|
91
|
+
"@expressive-code/plugin-line-numbers": "^0.44.2",
|
|
92
|
+
"@lucide/astro": "^1.38.0",
|
|
93
|
+
"@mcp-b/webmcp-polyfill": "^5.1.0",
|
|
94
94
|
"@pagefind/component-ui": "^1.5.2",
|
|
95
95
|
"@waline/client": "^3.15.2",
|
|
96
96
|
"@xingwangzhe/satteri-mermaid": "0.7.7",
|
|
97
97
|
"@xingwangzhe/satteri-photoswipe": "^0.2.4",
|
|
98
98
|
"@xingwangzhe/tags-cloud": "^1.2.7",
|
|
99
|
-
"astro-expressive-code": "^0.44.
|
|
100
|
-
"astro-seo": "^1.
|
|
99
|
+
"astro-expressive-code": "^0.44.2",
|
|
100
|
+
"astro-seo": "^1.2.0",
|
|
101
101
|
"astro-typewriter": "^1.2.0",
|
|
102
102
|
"badge-maker": "^6.0.0",
|
|
103
103
|
"pagefind": "^1.5.2",
|
|
104
104
|
"photoswipe": "^5.4.4",
|
|
105
105
|
"satteri": "^0.10.5",
|
|
106
|
-
"simple-icons": "^16.
|
|
107
|
-
"subset-font": "^2.
|
|
108
|
-
"temml": "^0.13.
|
|
106
|
+
"simple-icons": "^16.29.0",
|
|
107
|
+
"subset-font": "^2.7.0",
|
|
108
|
+
"temml": "^0.13.5"
|
|
109
109
|
},
|
|
110
110
|
"devDependencies": {
|
|
111
111
|
"@astrojs/check": "0.9.10",
|
|
112
112
|
"@biomejs/biome": "2.5.11",
|
|
113
113
|
"@vitest/coverage-v8": "4.1.11",
|
|
114
|
-
"astro": "^7.2.
|
|
115
|
-
"knip": "^6.
|
|
114
|
+
"astro": "^7.2.10",
|
|
115
|
+
"knip": "^6.34.0",
|
|
116
116
|
"typescript": "npm:@typescript/typescript6@6.0.2",
|
|
117
117
|
"vite": "8.2.2",
|
|
118
118
|
"vitest": "4.1.11"
|
|
119
119
|
},
|
|
120
120
|
"peerDependencies": {
|
|
121
|
-
"astro": "7.2.
|
|
121
|
+
"astro": "7.2.10"
|
|
122
122
|
}
|
|
123
123
|
}
|
package/src/index.ts
CHANGED
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
collectPluginNames,
|
|
33
33
|
prepareSatteriProcessor,
|
|
34
34
|
} from "./internal/satteri-config";
|
|
35
|
+
import { createViteAliases } from "./internal/vite-aliases";
|
|
35
36
|
import { featureFlagsHast, featureFlagsMdast } from "./plugins/feature-flags";
|
|
36
37
|
import { temml } from "./plugins/satteri-temml";
|
|
37
38
|
|
|
@@ -118,24 +119,6 @@ function syncBackgroundSvgs(srcDir: string): { copied: number; skipped: number }
|
|
|
118
119
|
return { copied, skipped };
|
|
119
120
|
}
|
|
120
121
|
|
|
121
|
-
// ---------------------------------------------------------------------------
|
|
122
|
-
// Vite 别名配置(供页面使用 @components etc.)
|
|
123
|
-
// ---------------------------------------------------------------------------
|
|
124
|
-
|
|
125
|
-
function getViteAliases(srcDir: string) {
|
|
126
|
-
return {
|
|
127
|
-
"@components": path.resolve(srcDir, "components"),
|
|
128
|
-
"@assets": path.resolve(srcDir, "assets"),
|
|
129
|
-
"@layouts": path.resolve(srcDir, "layouts"),
|
|
130
|
-
"@scripts": path.resolve(srcDir, "scripts"),
|
|
131
|
-
"@styles": path.resolve(srcDir, "styles"),
|
|
132
|
-
"@utils": path.resolve(srcDir, "utils"),
|
|
133
|
-
"@i18n": path.resolve(srcDir, "i18n"),
|
|
134
|
-
"@plugins": path.resolve(srcDir, "plugins"),
|
|
135
|
-
"@schemas": path.resolve(srcDir, "schemas"),
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
|
|
139
122
|
// ---------------------------------------------------------------------------
|
|
140
123
|
// 集成入口
|
|
141
124
|
// ---------------------------------------------------------------------------
|
|
@@ -189,7 +172,7 @@ export function stalux(options: StaluxOptions = {}): AstroIntegration[] {
|
|
|
189
172
|
updateConfig({
|
|
190
173
|
vite: {
|
|
191
174
|
resolve: {
|
|
192
|
-
alias:
|
|
175
|
+
alias: createViteAliases(srcDir),
|
|
193
176
|
},
|
|
194
177
|
plugins: [staluxComponentsAlias(opt.components)],
|
|
195
178
|
define: {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
|
|
3
|
+
export function createViteAliases(srcDir: string): Record<string, string> {
|
|
4
|
+
return {
|
|
5
|
+
"@components": path.resolve(srcDir, "components"),
|
|
6
|
+
"@assets": path.resolve(srcDir, "assets"),
|
|
7
|
+
"@layouts": path.resolve(srcDir, "layouts"),
|
|
8
|
+
"@scripts": path.resolve(srcDir, "scripts"),
|
|
9
|
+
"@styles": path.resolve(srcDir, "styles"),
|
|
10
|
+
"@utils": path.resolve(srcDir, "utils"),
|
|
11
|
+
"@i18n": path.resolve(srcDir, "i18n"),
|
|
12
|
+
"@plugins": path.resolve(srcDir, "plugins"),
|
|
13
|
+
"@schemas": path.resolve(srcDir, "schemas"),
|
|
14
|
+
"@internal": path.resolve(srcDir, "internal"),
|
|
15
|
+
};
|
|
16
|
+
}
|