@xingwangzhe/stalux 1.3.4 → 1.3.5
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
CHANGED
package/scripts/cli.mjs
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* npm run init # 或通过 npm script
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import { existsSync, mkdirSync, cpSync, readdirSync, statSync
|
|
12
|
+
import { existsSync, mkdirSync, cpSync, readdirSync, statSync } from "node:fs";
|
|
13
13
|
import { join, resolve, dirname } from "node:path";
|
|
14
14
|
import { fileURLToPath } from "node:url";
|
|
15
15
|
|
package/src/index.ts
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
* 基于 Astro 7.1.3 Integration API(astro:config:setup / injectRoute / injectScript)
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import { resolve } from "node:path";
|
|
12
11
|
import path from "node:path";
|
|
13
12
|
import { fileURLToPath } from "node:url";
|
|
14
13
|
|
|
@@ -142,7 +141,7 @@ export function stalux(options: StaluxOptions = {}): AstroIntegration {
|
|
|
142
141
|
injectScript,
|
|
143
142
|
updateConfig,
|
|
144
143
|
addDevToolbarApp,
|
|
145
|
-
|
|
144
|
+
_config,
|
|
146
145
|
logger,
|
|
147
146
|
}) => {
|
|
148
147
|
const srcDir = fileURLToPath(new URL(".", import.meta.url));
|
|
@@ -163,17 +163,8 @@ const wordCharsCache = new Map<string, string>();
|
|
|
163
163
|
function collectCommonChars(projectRoot: string): string {
|
|
164
164
|
const chars = new Set(ALWAYS_INCLUDE_CHARS);
|
|
165
165
|
|
|
166
|
-
|
|
167
|
-
"src/i18n/*.json",
|
|
168
|
-
"src/components/stalux/**/*.astro",
|
|
169
|
-
"src/layouts/**/*.astro",
|
|
170
|
-
"src/pages/**/*.astro",
|
|
171
|
-
"src/pages/**/*.ts",
|
|
172
|
-
];
|
|
173
|
-
|
|
174
|
-
// Since we can't use glob here easily, scan specific known files
|
|
166
|
+
// Scan all source directories for UI text characters
|
|
175
167
|
const srcDir = resolve(projectRoot, "src");
|
|
176
|
-
const scanDirs = ["i18n", "components/stalux", "layouts", "pages"];
|
|
177
168
|
|
|
178
169
|
function scanDir(dir: string) {
|
|
179
170
|
if (!existsSync(dir)) return;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { satteri } from "@astrojs/markdown-satteri";
|
|
2
2
|
import sitemap from "@astrojs/sitemap";
|
|
3
|
-
import {
|
|
3
|
+
import { mermaidHast } from "@xingwangzhe/satteri-mermaid";
|
|
4
4
|
import { photoswipe } from "@xingwangzhe/satteri-photoswipe";
|
|
5
5
|
import expressiveCode from "astro-expressive-code";
|
|
6
6
|
import { defineConfig } from "astro/config";
|