valaxy 0.0.9 → 0.1.0
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/bin/valaxy.js +1 -1
- package/dist/build-CLF7GOPQ.mjs +1 -0
- package/dist/build-F47TGGER.js +1 -0
- package/dist/{node/index.mjs → chunk-5S6S3FLN.mjs} +36 -36
- package/dist/chunk-JORQSKHF.mjs +1 -0
- package/dist/chunk-TOMJSB6R.js +83 -0
- package/dist/chunk-VJNIZVTJ.js +1 -0
- package/dist/{node/cli.d.ts → cli.d.ts} +0 -0
- package/dist/cli.js +6 -0
- package/dist/cli.mjs +6 -0
- package/dist/index.d.ts +152 -305
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +3 -3
- package/src/node/plugins/preset.ts +1 -0
- package/src/node/vite.ts +3 -2
- package/tsup.config.ts +3 -3
- package/dist/config-d6527c8c.d.ts +0 -174
- package/dist/node/cli.js +0 -88
- package/dist/node/cli.mjs +0 -88
- package/dist/node/index.d.ts +0 -45
- package/dist/node/index.js +0 -83
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "valaxy",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "📄 Vite & Vue powered static blog generator.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
"vite-ssg-sitemap": "^0.2.0"
|
|
83
83
|
},
|
|
84
84
|
"scripts": {
|
|
85
|
-
"build": "tsup",
|
|
86
|
-
"dev": "tsup --watch",
|
|
85
|
+
"build": "tsup --splitting",
|
|
86
|
+
"dev": "tsup --watch --splitting",
|
|
87
87
|
"lint": "eslint \"**/*.{vue,ts,js}\"",
|
|
88
88
|
"preview": "vite preview",
|
|
89
89
|
"preview-https": "serve dist",
|
package/src/node/vite.ts
CHANGED
|
@@ -30,9 +30,10 @@ export function createViteConfig(options: ResolvedValaxyOptions, serverOptions:
|
|
|
30
30
|
server: {
|
|
31
31
|
fs: {
|
|
32
32
|
allow: [
|
|
33
|
-
|
|
33
|
+
// not need to search workspace root
|
|
34
|
+
options.clientRoot,
|
|
35
|
+
options.themeRoot,
|
|
34
36
|
searchForWorkspaceRoot(options.userRoot),
|
|
35
|
-
searchForWorkspaceRoot(options.themeRoot),
|
|
36
37
|
],
|
|
37
38
|
},
|
|
38
39
|
},
|
package/tsup.config.ts
CHANGED
|
@@ -5,10 +5,10 @@ export default defineConfig((options) => {
|
|
|
5
5
|
entry: [
|
|
6
6
|
'src/node/index.ts',
|
|
7
7
|
'src/node/cli.ts',
|
|
8
|
-
'src/index.ts',
|
|
9
8
|
],
|
|
10
|
-
// splitting
|
|
11
|
-
splitting
|
|
9
|
+
// https://tsup.egoist.sh/#code-splitting
|
|
10
|
+
// Code splitting currently only works with the esm output format, and it's enabled by default. If you want code splitting for cjs output format as well, try using --splitting flag which is an experimental feature to get rid of the limitation in esbuild.
|
|
11
|
+
splitting: true,
|
|
12
12
|
clean: true,
|
|
13
13
|
dts: true,
|
|
14
14
|
format: ['cjs', 'esm'],
|
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import { PartialDeep } from 'type-fest';
|
|
2
|
-
import { VitePluginConfig } from 'unocss/vite';
|
|
3
|
-
import MarkdownIt from 'markdown-it';
|
|
4
|
-
import Anchor from 'markdown-it-anchor';
|
|
5
|
-
import { KatexOptions } from 'katex';
|
|
6
|
-
import Markdown from 'vite-plugin-md';
|
|
7
|
-
|
|
8
|
-
interface MarkdownOptions extends MarkdownIt.Options {
|
|
9
|
-
config?: (md: MarkdownIt) => void;
|
|
10
|
-
anchor?: {
|
|
11
|
-
permalink?: Anchor.AnchorOptions['permalink'];
|
|
12
|
-
};
|
|
13
|
-
toc?: any;
|
|
14
|
-
katex?: KatexOptions;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
declare type ViteMdOptions = Parameters<typeof Markdown>[0];
|
|
18
|
-
|
|
19
|
-
declare type ValaxyThemeConfig = Record<string, any>;
|
|
20
|
-
interface SocialLink {
|
|
21
|
-
/**
|
|
22
|
-
* The title of your link
|
|
23
|
-
*/
|
|
24
|
-
name: string;
|
|
25
|
-
link: string;
|
|
26
|
-
/**
|
|
27
|
-
* 图标名称
|
|
28
|
-
* https://icones.js.org/
|
|
29
|
-
*/
|
|
30
|
-
icon: string;
|
|
31
|
-
color: string;
|
|
32
|
-
}
|
|
33
|
-
interface ValaxyConfig<T = ValaxyThemeConfig> {
|
|
34
|
-
/**
|
|
35
|
-
* Default language
|
|
36
|
-
* @description 默认语言
|
|
37
|
-
* @default 'en'
|
|
38
|
-
*/
|
|
39
|
-
lang: string;
|
|
40
|
-
/**
|
|
41
|
-
* You site url in web, required for ssg, do not add / in end
|
|
42
|
-
* @description 站点的 URL,SSG 需要(譬如生成版权处文章永久链接),不要在末尾添加 /
|
|
43
|
-
*/
|
|
44
|
-
url: string;
|
|
45
|
-
/**
|
|
46
|
-
* Site title
|
|
47
|
-
* @description 站点标题
|
|
48
|
-
*/
|
|
49
|
-
title: string;
|
|
50
|
-
/**
|
|
51
|
-
* 副标题
|
|
52
|
-
*/
|
|
53
|
-
subtitle: string;
|
|
54
|
-
/**
|
|
55
|
-
* 站点描述
|
|
56
|
-
*/
|
|
57
|
-
description: string;
|
|
58
|
-
/**
|
|
59
|
-
* The owner of this blog
|
|
60
|
-
* @description 博客作者
|
|
61
|
-
*/
|
|
62
|
-
author: {
|
|
63
|
-
/**
|
|
64
|
-
* Your name
|
|
65
|
-
* @description 你的名字
|
|
66
|
-
*/
|
|
67
|
-
name: string;
|
|
68
|
-
avatar: string;
|
|
69
|
-
/**
|
|
70
|
-
* The status of you
|
|
71
|
-
* @description 状态
|
|
72
|
-
*/
|
|
73
|
-
status: {
|
|
74
|
-
emoji: string;
|
|
75
|
-
/**
|
|
76
|
-
* show when hover emoji
|
|
77
|
-
* @description 当鼠标悬浮在图标上时显示
|
|
78
|
-
*/
|
|
79
|
-
message: string;
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
/**
|
|
83
|
-
* 社交链接
|
|
84
|
-
*/
|
|
85
|
-
social: SocialLink[];
|
|
86
|
-
/**
|
|
87
|
-
* search
|
|
88
|
-
*/
|
|
89
|
-
search: {
|
|
90
|
-
algolia: {
|
|
91
|
-
enable: boolean;
|
|
92
|
-
appId: string;
|
|
93
|
-
apiKey: string;
|
|
94
|
-
indexName: string;
|
|
95
|
-
chunkSize: number;
|
|
96
|
-
};
|
|
97
|
-
};
|
|
98
|
-
/**
|
|
99
|
-
* comment: waline/...
|
|
100
|
-
*/
|
|
101
|
-
comment: {
|
|
102
|
-
waline: {
|
|
103
|
-
enable: boolean;
|
|
104
|
-
serverURL: string;
|
|
105
|
-
};
|
|
106
|
-
};
|
|
107
|
-
/**
|
|
108
|
-
* The name of theme
|
|
109
|
-
* @description 主题名称
|
|
110
|
-
*/
|
|
111
|
-
theme: string;
|
|
112
|
-
/**
|
|
113
|
-
* The config of theme
|
|
114
|
-
* @description 主题配置
|
|
115
|
-
*/
|
|
116
|
-
themeConfig: T;
|
|
117
|
-
/**
|
|
118
|
-
* Unocss Config
|
|
119
|
-
*/
|
|
120
|
-
unocss: VitePluginConfig;
|
|
121
|
-
/**
|
|
122
|
-
* The license of your posts
|
|
123
|
-
* @description 文章所使用的协议,默认使用 Creative Commons
|
|
124
|
-
* @default https://creativecommons.org/licenses/
|
|
125
|
-
*/
|
|
126
|
-
license: {
|
|
127
|
-
/**
|
|
128
|
-
* Whether to show at the bottom of the article
|
|
129
|
-
* @description 是否显示在文章底部
|
|
130
|
-
* @default true
|
|
131
|
-
*/
|
|
132
|
-
enabled: boolean;
|
|
133
|
-
/**
|
|
134
|
-
* Creative License Language, same with your config.lang
|
|
135
|
-
* when lang === 'zh-CN', use 'zh'
|
|
136
|
-
* @description 默认与站点语言相同
|
|
137
|
-
* @default 'en'
|
|
138
|
-
*/
|
|
139
|
-
language: string;
|
|
140
|
-
/**
|
|
141
|
-
* Type of license
|
|
142
|
-
* @description 证书类型
|
|
143
|
-
* @default 'by-nc-sa'
|
|
144
|
-
*/
|
|
145
|
-
type: 'zero' | 'by-sa' | 'by-nd' | 'by-nc' | 'by-nc-sa' | 'by-nc-nd';
|
|
146
|
-
};
|
|
147
|
-
/**
|
|
148
|
-
* donate for author
|
|
149
|
-
* @description 打赏/赞助
|
|
150
|
-
*/
|
|
151
|
-
sponsor: {
|
|
152
|
-
enable: boolean;
|
|
153
|
-
title: string;
|
|
154
|
-
methods: {
|
|
155
|
-
name: string;
|
|
156
|
-
url: string;
|
|
157
|
-
color: string;
|
|
158
|
-
icon: string;
|
|
159
|
-
}[];
|
|
160
|
-
};
|
|
161
|
-
/**
|
|
162
|
-
* for markdown
|
|
163
|
-
*/
|
|
164
|
-
markdown: ViteMdOptions;
|
|
165
|
-
markdownIt: MarkdownOptions;
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
* Valaxy User Config
|
|
169
|
-
* @description Valaxy 用户配置
|
|
170
|
-
*/
|
|
171
|
-
declare type UserConfig<T = ValaxyThemeConfig> = PartialDeep<ValaxyConfig<T>>;
|
|
172
|
-
declare const defaultValaxyConfig: ValaxyConfig;
|
|
173
|
-
|
|
174
|
-
export { SocialLink as S, UserConfig as U, ValaxyConfig as V, ValaxyThemeConfig as a, defaultValaxyConfig as d };
|