rspress 2.0.0-beta.0 ā 2.0.0-beta.10
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/README.md +2 -2
- package/dist/index.js +4 -3
- package/meta-json-schema.json +268 -0
- package/package.json +13 -10
package/README.md
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# Rspress
|
2
2
|
|
3
3
|
<picture>
|
4
|
-
<img alt="Rspress Banner" src="https://assets.rspack.
|
4
|
+
<img alt="Rspress Banner" src="https://assets.rspack.rs/rspress/rspress-banner.png">
|
5
5
|
</picture>
|
6
6
|
|
7
7
|
<h2 align="center">A fast Rsbuild-based static site generator.</h2>
|
8
8
|
|
9
9
|
## Getting started
|
10
10
|
|
11
|
-
Go to the [Quick start](https://rspress.
|
11
|
+
Go to the [Quick start](https://rspress.rs/guide/start/getting-started.html) to get started.
|
12
12
|
|
13
13
|
### License
|
14
14
|
|
package/dist/index.js
CHANGED
@@ -8,7 +8,7 @@ import * as __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__ from "node:fs";
|
|
8
8
|
import * as __WEBPACK_EXTERNAL_MODULE__rspress_shared_constants_70084e62__ from "@rspress/shared/constants";
|
9
9
|
import * as __WEBPACK_EXTERNAL_MODULE_node_child_process_27f17141__ from "node:child_process";
|
10
10
|
import * as __WEBPACK_EXTERNAL_MODULE_node_fs_promises_153e37e0__ from "node:fs/promises";
|
11
|
-
var package_namespaceObject = JSON.parse('{"i8":"2.0.0-beta.
|
11
|
+
var package_namespaceObject = JSON.parse('{"i8":"2.0.0-beta.10"}');
|
12
12
|
const findConfig = (basePath)=>__WEBPACK_EXTERNAL_MODULE__rspress_shared_constants_70084e62__.DEFAULT_CONFIG_EXTENSIONS.map((ext)=>basePath + ext).find(__WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__["default"].existsSync);
|
13
13
|
async function loadConfigFile(customConfigFile) {
|
14
14
|
const baseDir = process.cwd();
|
@@ -91,7 +91,7 @@ const CONFIG_FILES = [
|
|
91
91
|
];
|
92
92
|
const META_FILE = '_meta.json';
|
93
93
|
const cli = (0, __WEBPACK_EXTERNAL_MODULE_cac__.cac)('rspress').version(package_namespaceObject.i8).help();
|
94
|
-
const landingMessage =
|
94
|
+
const landingMessage = `\u{1F525} Rspress v${package_namespaceObject.i8}\n`;
|
95
95
|
__WEBPACK_EXTERNAL_MODULE__rspress_shared_logger_4374e44a__.logger.greet(landingMessage);
|
96
96
|
const setNodeEnv = (env)=>{
|
97
97
|
process.env.NODE_ENV = env;
|
@@ -134,7 +134,8 @@ cli.command('[root]', 'start dev server').alias('dev').option('--port [port]', '
|
|
134
134
|
if ('add' === eventName || 'unlink' === eventName || 'change' === eventName && (CONFIG_FILES.includes(__WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].basename(filepath)) || __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].basename(filepath) === META_FILE)) {
|
135
135
|
if (isRestarting) return;
|
136
136
|
isRestarting = true;
|
137
|
-
console.log(
|
137
|
+
console.log(`
|
138
|
+
\u{2728} ${eventName} ${__WEBPACK_EXTERNAL_MODULE_picocolors__["default"].green(__WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].relative(cwd, filepath))}, dev server will restart...\n`);
|
138
139
|
await devServer.close();
|
139
140
|
await cliWatcher.close();
|
140
141
|
await startDevServer();
|
@@ -0,0 +1,268 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
3
|
+
"$ref": "#/definitions/MetaJson",
|
4
|
+
"definitions": {
|
5
|
+
"MetaJson": {
|
6
|
+
"anyOf": [
|
7
|
+
{
|
8
|
+
"type": "array",
|
9
|
+
"items": {
|
10
|
+
"$ref": "#/definitions/SideMetaItem"
|
11
|
+
}
|
12
|
+
},
|
13
|
+
{
|
14
|
+
"type": "array",
|
15
|
+
"items": {
|
16
|
+
"$ref": "#/definitions/NavItem"
|
17
|
+
}
|
18
|
+
}
|
19
|
+
]
|
20
|
+
},
|
21
|
+
"SideMetaItem": {
|
22
|
+
"anyOf": [
|
23
|
+
{
|
24
|
+
"type": "object",
|
25
|
+
"properties": {
|
26
|
+
"type": {
|
27
|
+
"type": "string",
|
28
|
+
"const": "file"
|
29
|
+
},
|
30
|
+
"name": {
|
31
|
+
"type": "string"
|
32
|
+
},
|
33
|
+
"label": {
|
34
|
+
"type": "string"
|
35
|
+
},
|
36
|
+
"tag": {
|
37
|
+
"type": "string"
|
38
|
+
},
|
39
|
+
"overviewHeaders": {
|
40
|
+
"type": "array",
|
41
|
+
"items": {
|
42
|
+
"type": "number"
|
43
|
+
}
|
44
|
+
},
|
45
|
+
"context": {
|
46
|
+
"type": "string"
|
47
|
+
}
|
48
|
+
},
|
49
|
+
"required": [
|
50
|
+
"type",
|
51
|
+
"name"
|
52
|
+
],
|
53
|
+
"additionalProperties": false
|
54
|
+
},
|
55
|
+
{
|
56
|
+
"type": "object",
|
57
|
+
"properties": {
|
58
|
+
"type": {
|
59
|
+
"type": "string",
|
60
|
+
"const": "dir"
|
61
|
+
},
|
62
|
+
"name": {
|
63
|
+
"type": "string"
|
64
|
+
},
|
65
|
+
"label": {
|
66
|
+
"type": "string"
|
67
|
+
},
|
68
|
+
"collapsible": {
|
69
|
+
"type": "boolean"
|
70
|
+
},
|
71
|
+
"collapsed": {
|
72
|
+
"type": "boolean"
|
73
|
+
},
|
74
|
+
"tag": {
|
75
|
+
"type": "string"
|
76
|
+
},
|
77
|
+
"overviewHeaders": {
|
78
|
+
"type": "array",
|
79
|
+
"items": {
|
80
|
+
"type": "number"
|
81
|
+
}
|
82
|
+
},
|
83
|
+
"context": {
|
84
|
+
"type": "string"
|
85
|
+
}
|
86
|
+
},
|
87
|
+
"required": [
|
88
|
+
"type",
|
89
|
+
"name"
|
90
|
+
],
|
91
|
+
"additionalProperties": false
|
92
|
+
},
|
93
|
+
{
|
94
|
+
"type": "object",
|
95
|
+
"properties": {
|
96
|
+
"type": {
|
97
|
+
"type": "string",
|
98
|
+
"const": "divider"
|
99
|
+
},
|
100
|
+
"dashed": {
|
101
|
+
"type": "boolean"
|
102
|
+
}
|
103
|
+
},
|
104
|
+
"required": [
|
105
|
+
"type"
|
106
|
+
],
|
107
|
+
"additionalProperties": false
|
108
|
+
},
|
109
|
+
{
|
110
|
+
"type": "object",
|
111
|
+
"properties": {
|
112
|
+
"type": {
|
113
|
+
"type": "string",
|
114
|
+
"const": "section-header"
|
115
|
+
},
|
116
|
+
"label": {
|
117
|
+
"type": "string"
|
118
|
+
},
|
119
|
+
"tag": {
|
120
|
+
"type": "string"
|
121
|
+
}
|
122
|
+
},
|
123
|
+
"required": [
|
124
|
+
"type",
|
125
|
+
"label"
|
126
|
+
],
|
127
|
+
"additionalProperties": false
|
128
|
+
},
|
129
|
+
{
|
130
|
+
"type": "object",
|
131
|
+
"properties": {
|
132
|
+
"type": {
|
133
|
+
"type": "string",
|
134
|
+
"const": "custom-link"
|
135
|
+
},
|
136
|
+
"label": {
|
137
|
+
"type": "string"
|
138
|
+
},
|
139
|
+
"link": {
|
140
|
+
"type": "string"
|
141
|
+
},
|
142
|
+
"context": {
|
143
|
+
"type": "string"
|
144
|
+
},
|
145
|
+
"tag": {
|
146
|
+
"type": "string"
|
147
|
+
}
|
148
|
+
},
|
149
|
+
"required": [
|
150
|
+
"type",
|
151
|
+
"label",
|
152
|
+
"link"
|
153
|
+
],
|
154
|
+
"additionalProperties": false
|
155
|
+
},
|
156
|
+
{
|
157
|
+
"type": "string"
|
158
|
+
}
|
159
|
+
]
|
160
|
+
},
|
161
|
+
"NavItem": {
|
162
|
+
"anyOf": [
|
163
|
+
{
|
164
|
+
"$ref": "#/definitions/NavItemWithLink"
|
165
|
+
},
|
166
|
+
{
|
167
|
+
"$ref": "#/definitions/NavItemWithChildren"
|
168
|
+
},
|
169
|
+
{
|
170
|
+
"$ref": "#/definitions/NavItemWithLinkAndChildren"
|
171
|
+
}
|
172
|
+
]
|
173
|
+
},
|
174
|
+
"NavItemWithLink": {
|
175
|
+
"type": "object",
|
176
|
+
"properties": {
|
177
|
+
"text": {
|
178
|
+
"type": "string"
|
179
|
+
},
|
180
|
+
"link": {
|
181
|
+
"type": "string"
|
182
|
+
},
|
183
|
+
"tag": {
|
184
|
+
"type": "string"
|
185
|
+
},
|
186
|
+
"activeMatch": {
|
187
|
+
"type": "string"
|
188
|
+
},
|
189
|
+
"position": {
|
190
|
+
"type": "string",
|
191
|
+
"enum": [
|
192
|
+
"left",
|
193
|
+
"right"
|
194
|
+
]
|
195
|
+
}
|
196
|
+
},
|
197
|
+
"required": [
|
198
|
+
"text",
|
199
|
+
"link"
|
200
|
+
],
|
201
|
+
"additionalProperties": false
|
202
|
+
},
|
203
|
+
"NavItemWithChildren": {
|
204
|
+
"type": "object",
|
205
|
+
"properties": {
|
206
|
+
"text": {
|
207
|
+
"type": "string"
|
208
|
+
},
|
209
|
+
"tag": {
|
210
|
+
"type": "string"
|
211
|
+
},
|
212
|
+
"items": {
|
213
|
+
"type": "array",
|
214
|
+
"items": {
|
215
|
+
"$ref": "#/definitions/NavItemWithLink"
|
216
|
+
}
|
217
|
+
},
|
218
|
+
"position": {
|
219
|
+
"type": "string",
|
220
|
+
"enum": [
|
221
|
+
"left",
|
222
|
+
"right"
|
223
|
+
]
|
224
|
+
}
|
225
|
+
},
|
226
|
+
"required": [
|
227
|
+
"items"
|
228
|
+
],
|
229
|
+
"additionalProperties": false
|
230
|
+
},
|
231
|
+
"NavItemWithLinkAndChildren": {
|
232
|
+
"type": "object",
|
233
|
+
"properties": {
|
234
|
+
"text": {
|
235
|
+
"type": "string"
|
236
|
+
},
|
237
|
+
"link": {
|
238
|
+
"type": "string"
|
239
|
+
},
|
240
|
+
"items": {
|
241
|
+
"type": "array",
|
242
|
+
"items": {
|
243
|
+
"$ref": "#/definitions/NavItemWithLink"
|
244
|
+
}
|
245
|
+
},
|
246
|
+
"tag": {
|
247
|
+
"type": "string"
|
248
|
+
},
|
249
|
+
"activeMatch": {
|
250
|
+
"type": "string"
|
251
|
+
},
|
252
|
+
"position": {
|
253
|
+
"type": "string",
|
254
|
+
"enum": [
|
255
|
+
"left",
|
256
|
+
"right"
|
257
|
+
]
|
258
|
+
}
|
259
|
+
},
|
260
|
+
"required": [
|
261
|
+
"text",
|
262
|
+
"link",
|
263
|
+
"items"
|
264
|
+
],
|
265
|
+
"additionalProperties": false
|
266
|
+
}
|
267
|
+
}
|
268
|
+
}
|
package/package.json
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
{
|
2
2
|
"name": "rspress",
|
3
|
-
"version": "2.0.0-beta.
|
3
|
+
"version": "2.0.0-beta.10",
|
4
4
|
"repository": {
|
5
5
|
"type": "git",
|
6
|
-
"url": "https://github.com/web-infra-dev/rspress",
|
6
|
+
"url": "git+https://github.com/web-infra-dev/rspress.git",
|
7
7
|
"directory": "packages/cli"
|
8
8
|
},
|
9
9
|
"license": "MIT",
|
@@ -33,23 +33,26 @@
|
|
33
33
|
"dist",
|
34
34
|
"runtime.ts",
|
35
35
|
"theme.ts",
|
36
|
-
"config.ts"
|
36
|
+
"config.ts",
|
37
|
+
"meta-json-schema.json"
|
37
38
|
],
|
38
39
|
"dependencies": {
|
39
|
-
"@rsbuild/core": "1.3.
|
40
|
+
"@rsbuild/core": "~1.3.21",
|
40
41
|
"cac": "^6.7.14",
|
41
42
|
"chokidar": "^3.6.0",
|
42
43
|
"picocolors": "^1.1.1",
|
43
|
-
"@rspress/core": "2.0.0-beta.
|
44
|
-
"@rspress/shared": "2.0.0-beta.
|
44
|
+
"@rspress/core": "2.0.0-beta.10",
|
45
|
+
"@rspress/shared": "2.0.0-beta.10"
|
45
46
|
},
|
46
47
|
"devDependencies": {
|
47
|
-
"@microsoft/api-extractor": "^7.52.
|
48
|
-
"@rslib/core": "0.
|
48
|
+
"@microsoft/api-extractor": "^7.52.8",
|
49
|
+
"@rslib/core": "0.8.0",
|
49
50
|
"@types/jest": "~29.5.14",
|
50
|
-
"@types/node": "^
|
51
|
-
"@types/react": "^18.3.
|
51
|
+
"@types/node": "^22.8.1",
|
52
|
+
"@types/react": "^18.3.22",
|
52
53
|
"rimraf": "^6.0.1",
|
54
|
+
"rsbuild-plugin-publint": "^0.3.2",
|
55
|
+
"ts-json-schema-generator": "^2.4.0",
|
53
56
|
"typescript": "^5.8.2"
|
54
57
|
},
|
55
58
|
"publishConfig": {
|