jeawin-astro 3.0.13 → 3.0.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
CHANGED
|
@@ -1,92 +1,92 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "jeawin-astro",
|
|
3
|
-
"version": "3.0.
|
|
4
|
-
"author": "chaegumi <chaegumi@qq.com>",
|
|
5
|
-
"description": "",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"repository": {
|
|
8
|
-
"type": "git",
|
|
9
|
-
"url": "https://github.com/chaegumi/jeawin-astro.git"
|
|
10
|
-
},
|
|
11
|
-
"homepage": "https://www.jeawin.com/",
|
|
12
|
-
"type": "module",
|
|
13
|
-
"exports": {
|
|
14
|
-
".": "./index.ts",
|
|
15
|
-
"./layouts": "./src/layouts/index.ts",
|
|
16
|
-
"./integrations": "./src/integrations/index.ts",
|
|
17
|
-
"./examples": "./src/examples/index.ts",
|
|
18
|
-
"./components": "./src/components/index.ts",
|
|
19
|
-
"./scripts": "./src/scripts/index.ts",
|
|
20
|
-
"./service": "./src/service/index.ts",
|
|
21
|
-
"./assets": "./src/assets/index.ts"
|
|
22
|
-
},
|
|
23
|
-
"types": "./index.d.ts",
|
|
24
|
-
"scripts": {
|
|
25
|
-
"test": "mocha test"
|
|
26
|
-
},
|
|
27
|
-
"devDependencies": {
|
|
28
|
-
"@babel/core": "^7.26.9",
|
|
29
|
-
"@babel/preset-env": "^7.26.9",
|
|
30
|
-
"@rollup/plugin-babel": "^6.0.4",
|
|
31
|
-
"@rollup/plugin-commonjs": "^28.0.2",
|
|
32
|
-
"@rollup/plugin-json": "^6.1.0",
|
|
33
|
-
"@rollup/plugin-multi-entry": "^6.0.1",
|
|
34
|
-
"@rollup/plugin-node-resolve": "^15.3.1",
|
|
35
|
-
"@rollup/plugin-strip": "^3.0.4",
|
|
36
|
-
"@rollup/plugin-terser": "^0.4.4",
|
|
37
|
-
"@rollup/plugin-typescript": "^12.1.2",
|
|
38
|
-
"@types/lodash": "^4.17.15",
|
|
39
|
-
"@types/sprintf-js": "^1.1.4",
|
|
40
|
-
"autoprefixer": "^10.4.20",
|
|
41
|
-
"chai": "^5.2.0",
|
|
42
|
-
"mocha": "^10.8.2",
|
|
43
|
-
"postcss": "^8.5.2",
|
|
44
|
-
"rollup": "^4.34.8",
|
|
45
|
-
"rollup-plugin-node-externals": "^7.1.3",
|
|
46
|
-
"rollup-plugin-postcss": "^4.0.2",
|
|
47
|
-
"typescript": "^5.7.3"
|
|
48
|
-
},
|
|
49
|
-
"dependencies": {
|
|
50
|
-
"@astrojs/alpinejs": "^0.4.3",
|
|
51
|
-
"@astrojs/check": "^0.9.4",
|
|
52
|
-
"@astrojs/cloudflare": "^12.2.1",
|
|
53
|
-
"@astrojs/rss": "^4.0.11",
|
|
54
|
-
"@astrojs/sitemap": "3.2.1",
|
|
55
|
-
"@astrojs/ts-plugin": "^1.10.4",
|
|
56
|
-
"@astrojs/vue": "^5.0.6",
|
|
57
|
-
"@iconify-json/fa6-brands": "^1.2.5",
|
|
58
|
-
"@iconify-json/fa6-solid": "^1.2.3",
|
|
59
|
-
"@iconify/tools": "^4.1.1",
|
|
60
|
-
"@keyv/compress-brotli": "^2.0.3",
|
|
61
|
-
"@pagefind/default-ui": "^1.3.0",
|
|
62
|
-
"@tailwindcss/forms": "^0.5.10",
|
|
63
|
-
"@tailwindcss/typography": "^0.5.16",
|
|
64
|
-
"@tailwindcss/vite": "^4.0.6",
|
|
65
|
-
"@types/alpinejs": "^3.13.11",
|
|
66
|
-
"alpinejs": "^3.14.8",
|
|
67
|
-
"aos": "3.0.0-beta.6",
|
|
68
|
-
"astro": "^5.3.0",
|
|
69
|
-
"astro-color-scheme": "^1.1.5",
|
|
70
|
-
"astro-embed": "^0.9.0",
|
|
71
|
-
"astro-icon": "^1.1.5",
|
|
72
|
-
"astro-integration-kit": "^0.18.0",
|
|
73
|
-
"cacache": "^19.0.1",
|
|
74
|
-
"cheerio": "^1.0.0",
|
|
75
|
-
"dayjs": "^1.11.13",
|
|
76
|
-
"fetch-jsonp": "^1.3.0",
|
|
77
|
-
"glob": "^11.0.1",
|
|
78
|
-
"keyv": "^5.2.3",
|
|
79
|
-
"keyv-lru": "^3.0.4",
|
|
80
|
-
"lodash": "^4.17.21",
|
|
81
|
-
"pagefind": "^1.3.0",
|
|
82
|
-
"photoswipe": "^5.4.4",
|
|
83
|
-
"sirv": "^3.0.1",
|
|
84
|
-
"smartmenus": "2.0.0-alpha.1",
|
|
85
|
-
"sprintf-js": "^1.1.3",
|
|
86
|
-
"string-strip-html": "^13.4.8",
|
|
87
|
-
"swiper": "^11.2.4",
|
|
88
|
-
"tailwind-scrollbar": "^4.0.0",
|
|
89
|
-
"tailwindcss": "^4.0.6",
|
|
90
|
-
"tslib": "^2.8.1"
|
|
91
|
-
}
|
|
92
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "jeawin-astro",
|
|
3
|
+
"version": "3.0.15",
|
|
4
|
+
"author": "chaegumi <chaegumi@qq.com>",
|
|
5
|
+
"description": "",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/chaegumi/jeawin-astro.git"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://www.jeawin.com/",
|
|
12
|
+
"type": "module",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": "./index.ts",
|
|
15
|
+
"./layouts": "./src/layouts/index.ts",
|
|
16
|
+
"./integrations": "./src/integrations/index.ts",
|
|
17
|
+
"./examples": "./src/examples/index.ts",
|
|
18
|
+
"./components": "./src/components/index.ts",
|
|
19
|
+
"./scripts": "./src/scripts/index.ts",
|
|
20
|
+
"./service": "./src/service/index.ts",
|
|
21
|
+
"./assets": "./src/assets/index.ts"
|
|
22
|
+
},
|
|
23
|
+
"types": "./index.d.ts",
|
|
24
|
+
"scripts": {
|
|
25
|
+
"test": "mocha test"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@babel/core": "^7.26.9",
|
|
29
|
+
"@babel/preset-env": "^7.26.9",
|
|
30
|
+
"@rollup/plugin-babel": "^6.0.4",
|
|
31
|
+
"@rollup/plugin-commonjs": "^28.0.2",
|
|
32
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
33
|
+
"@rollup/plugin-multi-entry": "^6.0.1",
|
|
34
|
+
"@rollup/plugin-node-resolve": "^15.3.1",
|
|
35
|
+
"@rollup/plugin-strip": "^3.0.4",
|
|
36
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
37
|
+
"@rollup/plugin-typescript": "^12.1.2",
|
|
38
|
+
"@types/lodash": "^4.17.15",
|
|
39
|
+
"@types/sprintf-js": "^1.1.4",
|
|
40
|
+
"autoprefixer": "^10.4.20",
|
|
41
|
+
"chai": "^5.2.0",
|
|
42
|
+
"mocha": "^10.8.2",
|
|
43
|
+
"postcss": "^8.5.2",
|
|
44
|
+
"rollup": "^4.34.8",
|
|
45
|
+
"rollup-plugin-node-externals": "^7.1.3",
|
|
46
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
47
|
+
"typescript": "^5.7.3"
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"@astrojs/alpinejs": "^0.4.3",
|
|
51
|
+
"@astrojs/check": "^0.9.4",
|
|
52
|
+
"@astrojs/cloudflare": "^12.2.1",
|
|
53
|
+
"@astrojs/rss": "^4.0.11",
|
|
54
|
+
"@astrojs/sitemap": "3.2.1",
|
|
55
|
+
"@astrojs/ts-plugin": "^1.10.4",
|
|
56
|
+
"@astrojs/vue": "^5.0.6",
|
|
57
|
+
"@iconify-json/fa6-brands": "^1.2.5",
|
|
58
|
+
"@iconify-json/fa6-solid": "^1.2.3",
|
|
59
|
+
"@iconify/tools": "^4.1.1",
|
|
60
|
+
"@keyv/compress-brotli": "^2.0.3",
|
|
61
|
+
"@pagefind/default-ui": "^1.3.0",
|
|
62
|
+
"@tailwindcss/forms": "^0.5.10",
|
|
63
|
+
"@tailwindcss/typography": "^0.5.16",
|
|
64
|
+
"@tailwindcss/vite": "^4.0.6",
|
|
65
|
+
"@types/alpinejs": "^3.13.11",
|
|
66
|
+
"alpinejs": "^3.14.8",
|
|
67
|
+
"aos": "3.0.0-beta.6",
|
|
68
|
+
"astro": "^5.3.0",
|
|
69
|
+
"astro-color-scheme": "^1.1.5",
|
|
70
|
+
"astro-embed": "^0.9.0",
|
|
71
|
+
"astro-icon": "^1.1.5",
|
|
72
|
+
"astro-integration-kit": "^0.18.0",
|
|
73
|
+
"cacache": "^19.0.1",
|
|
74
|
+
"cheerio": "^1.0.0",
|
|
75
|
+
"dayjs": "^1.11.13",
|
|
76
|
+
"fetch-jsonp": "^1.3.0",
|
|
77
|
+
"glob": "^11.0.1",
|
|
78
|
+
"keyv": "^5.2.3",
|
|
79
|
+
"keyv-lru": "^3.0.4",
|
|
80
|
+
"lodash": "^4.17.21",
|
|
81
|
+
"pagefind": "^1.3.0",
|
|
82
|
+
"photoswipe": "^5.4.4",
|
|
83
|
+
"sirv": "^3.0.1",
|
|
84
|
+
"smartmenus": "2.0.0-alpha.1",
|
|
85
|
+
"sprintf-js": "^1.1.3",
|
|
86
|
+
"string-strip-html": "^13.4.8",
|
|
87
|
+
"swiper": "^11.2.4",
|
|
88
|
+
"tailwind-scrollbar": "^4.0.0",
|
|
89
|
+
"tailwindcss": "^4.0.6",
|
|
90
|
+
"tslib": "^2.8.1"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -60,7 +60,7 @@ const submitbuttontext = render_value(all_langs, "send message");
|
|
|
60
60
|
/>
|
|
61
61
|
<div class="mt-8 max-w-md mx-auto">
|
|
62
62
|
{forminfo.form_before_content ? (
|
|
63
|
-
<div class="my-2"
|
|
63
|
+
<div class="my-2"><Fragment set:html={forminfo.form_before_content} /></div>
|
|
64
64
|
) : null}
|
|
65
65
|
<div class="grid grid-cols-1 gap-4">
|
|
66
66
|
{forminfo.forms_fields.map((field: any) => (
|
|
@@ -102,7 +102,7 @@ const submitbuttontext = render_value(all_langs, "send message");
|
|
|
102
102
|
</div>
|
|
103
103
|
</div>
|
|
104
104
|
{forminfo.form_after_content ? (
|
|
105
|
-
<div class="my-2"
|
|
105
|
+
<div class="my-2"><Fragment set:html={forminfo.form_after_content} /></div>
|
|
106
106
|
) : null}
|
|
107
107
|
</div>
|
|
108
108
|
</form>
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export {default as jeawinRuntimeConfig} from "./jeawin-runtime-config/index.ts";
|
|
2
|
-
export {default as jeawinAstroPagefind} from "./jeawin-astro-pagefind/index.ts";
|
|
2
|
+
export {default as jeawinAstroPagefind} from "./jeawin-astro-pagefind/index.ts";
|
|
3
|
+
export {default as jeawinCommonRoute} from "./jeawin-common-route/index.ts";
|
|
4
|
+
export {default as jeawinSiteClearcache} from "./jeawin-site-clearcache/index.ts";
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 注入公用的route
|
|
3
|
+
*
|
|
4
|
+
* @package jeawin-astro
|
|
5
|
+
* @author Chaegumi
|
|
6
|
+
* @copyright Copyright (c) 2024-2099 jeawin.com
|
|
7
|
+
* @email chaegumi@jeawin.com
|
|
8
|
+
* @filesource
|
|
9
|
+
*/
|
|
10
|
+
import {defineIntegration, addVirtualImports,createResolver} from "astro-integration-kit";
|
|
11
|
+
|
|
12
|
+
export default defineIntegration({
|
|
13
|
+
name: "jeawin-common-route",
|
|
14
|
+
setup({name}) {
|
|
15
|
+
const { resolve } = createResolver(import.meta.url);
|
|
16
|
+
return {
|
|
17
|
+
hooks:{
|
|
18
|
+
"astro:config:setup":(params) => {
|
|
19
|
+
|
|
20
|
+
const {config, addMiddleware, injectRoute} = params;
|
|
21
|
+
|
|
22
|
+
// addMiddleware({
|
|
23
|
+
// entrypoint: '',
|
|
24
|
+
// order:'pre'
|
|
25
|
+
// });
|
|
26
|
+
|
|
27
|
+
injectRoute({
|
|
28
|
+
pattern: '/robots.txt',
|
|
29
|
+
entrypoint: resolve('../../pages/robots.txt.ts'),
|
|
30
|
+
prerender: true
|
|
31
|
+
});
|
|
32
|
+
injectRoute({
|
|
33
|
+
pattern: '/clear_cache',
|
|
34
|
+
entrypoint: resolve('../../pages/clear_cache.ts'),
|
|
35
|
+
prerender: true
|
|
36
|
+
});
|
|
37
|
+
injectRoute({
|
|
38
|
+
pattern: '/manifest.json',
|
|
39
|
+
entrypoint: resolve('../../pages/manifest.json.ts'),
|
|
40
|
+
prerender: true
|
|
41
|
+
});
|
|
42
|
+
injectRoute({
|
|
43
|
+
pattern: '/opensearch.xml',
|
|
44
|
+
entrypoint: resolve('../../pages/opensearch.xml.ts'),
|
|
45
|
+
prerender: true
|
|
46
|
+
});
|
|
47
|
+
injectRoute({
|
|
48
|
+
pattern: '/rss.xml',
|
|
49
|
+
entrypoint: resolve('../../pages/rss.xml.ts'),
|
|
50
|
+
prerender: true
|
|
51
|
+
});
|
|
52
|
+
injectRoute({
|
|
53
|
+
pattern: '/site.webmanifest',
|
|
54
|
+
entrypoint: resolve('../../pages/site.webmanifest.ts'),
|
|
55
|
+
prerender: true
|
|
56
|
+
});
|
|
57
|
+
injectRoute({
|
|
58
|
+
pattern: '/sitemap.txt',
|
|
59
|
+
entrypoint: resolve('../../pages/sitemap.txt.ts'),
|
|
60
|
+
prerender: true
|
|
61
|
+
});
|
|
62
|
+
injectRoute({
|
|
63
|
+
pattern: '/sitemap.xml',
|
|
64
|
+
entrypoint: resolve('../../pages/sitemap.xml.ts'),
|
|
65
|
+
prerender: true
|
|
66
|
+
});
|
|
67
|
+
injectRoute({
|
|
68
|
+
pattern: '/sitemap.xsl',
|
|
69
|
+
entrypoint: resolve('../../pages/sitemap.xsl.ts'),
|
|
70
|
+
prerender: true
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
})
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @filesource
|
|
9
9
|
*/
|
|
10
10
|
import {defineIntegration, addVirtualImports,createResolver} from "astro-integration-kit";
|
|
11
|
-
|
|
11
|
+
|
|
12
12
|
export default defineIntegration({
|
|
13
13
|
name: "jeawin-runtime-config",
|
|
14
14
|
setup({name}) {
|
|
@@ -24,65 +24,7 @@ export default defineIntegration({
|
|
|
24
24
|
'virtual:jeawin-runtime-config/config': `export default ${JSON.stringify(params.config)}`
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
|
-
|
|
28
|
-
// addMiddleware({
|
|
29
|
-
// entrypoint: '',
|
|
30
|
-
// order:'pre'
|
|
31
|
-
// });
|
|
32
|
-
|
|
33
|
-
injectRoute({
|
|
34
|
-
pattern: '/robots.txt',
|
|
35
|
-
entrypoint: resolve('../../pages/robots.txt.ts'),
|
|
36
|
-
prerender: true
|
|
37
|
-
});
|
|
38
|
-
injectRoute({
|
|
39
|
-
pattern: '/clear_cache',
|
|
40
|
-
entrypoint: resolve('../../pages/clear_cache.ts'),
|
|
41
|
-
prerender: true
|
|
42
|
-
});
|
|
43
|
-
injectRoute({
|
|
44
|
-
pattern: '/manifest.json',
|
|
45
|
-
entrypoint: resolve('../../pages/manifest.json.ts'),
|
|
46
|
-
prerender: true
|
|
47
|
-
});
|
|
48
|
-
injectRoute({
|
|
49
|
-
pattern: '/opensearch.xml',
|
|
50
|
-
entrypoint: resolve('../../pages/opensearch.xml.ts'),
|
|
51
|
-
prerender: true
|
|
52
|
-
});
|
|
53
|
-
injectRoute({
|
|
54
|
-
pattern: '/rss.xml',
|
|
55
|
-
entrypoint: resolve('../../pages/rss.xml.ts'),
|
|
56
|
-
prerender: true
|
|
57
|
-
});
|
|
58
|
-
injectRoute({
|
|
59
|
-
pattern: '/site.webmanifest',
|
|
60
|
-
entrypoint: resolve('../../pages/site.webmanifest.ts'),
|
|
61
|
-
prerender: true
|
|
62
|
-
});
|
|
63
|
-
injectRoute({
|
|
64
|
-
pattern: '/sitemap.txt',
|
|
65
|
-
entrypoint: resolve('../../pages/sitemap.txt.ts'),
|
|
66
|
-
prerender: true
|
|
67
|
-
});
|
|
68
|
-
injectRoute({
|
|
69
|
-
pattern: '/sitemap.xml',
|
|
70
|
-
entrypoint: resolve('../../pages/sitemap.xml.ts'),
|
|
71
|
-
prerender: true
|
|
72
|
-
});
|
|
73
|
-
injectRoute({
|
|
74
|
-
pattern: '/sitemap.xsl',
|
|
75
|
-
entrypoint: resolve('../../pages/sitemap.xsl.ts'),
|
|
76
|
-
prerender: true
|
|
77
|
-
});
|
|
78
|
-
|
|
79
27
|
|
|
80
|
-
},
|
|
81
|
-
"astro:build:start":() => {
|
|
82
|
-
// build之前,清空一下cacache缓存目录
|
|
83
|
-
cacache.rm.all('.cache/site').then(() => {
|
|
84
|
-
console.log('删除cacache');
|
|
85
|
-
});
|
|
86
28
|
}
|
|
87
29
|
}
|
|
88
30
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 清除静态站点的请求缓存
|
|
3
|
+
*
|
|
4
|
+
* @package jeawin-astro
|
|
5
|
+
* @author Chaegumi
|
|
6
|
+
* @copyright Copyright (c) 2024-2099 jeawin.com
|
|
7
|
+
* @email chaegumi@jeawin.com
|
|
8
|
+
* @filesource
|
|
9
|
+
*/
|
|
10
|
+
import {defineIntegration, addVirtualImports,createResolver} from "astro-integration-kit";
|
|
11
|
+
const cacache = await import('cacache');
|
|
12
|
+
export default defineIntegration({
|
|
13
|
+
name: "jeawin-site-clearcache",
|
|
14
|
+
setup({name}) {
|
|
15
|
+
const { resolve } = createResolver(import.meta.url);
|
|
16
|
+
return {
|
|
17
|
+
hooks:{
|
|
18
|
+
"astro:config:setup":(params) => {
|
|
19
|
+
|
|
20
|
+
},
|
|
21
|
+
"astro:build:start":() => {
|
|
22
|
+
// build之前,清空一下cacache缓存目录
|
|
23
|
+
cacache.rm.all('.cache/site').then(() => {
|
|
24
|
+
console.log('删除cacache');
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
})
|