create-vuepress-theme-plume 1.0.0-rc.136 → 1.0.0-rc.138
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/lib/index.js
CHANGED
|
@@ -107,6 +107,11 @@ async function createPackageJson(mode, pkg, {
|
|
|
107
107
|
if (packageManager === "yarn" && version.startsWith("1"))
|
|
108
108
|
version = "4.6.0";
|
|
109
109
|
pkg.packageManager = `${packageManager}@${version}`;
|
|
110
|
+
if (packageManager === "pnpm" && version.startsWith("10")) {
|
|
111
|
+
pkg.pnpm = {
|
|
112
|
+
onlyBuiltDependencies: ["@parcel/watcher", "esbuild"]
|
|
113
|
+
};
|
|
114
|
+
}
|
|
110
115
|
}
|
|
111
116
|
}
|
|
112
117
|
const userInfo = await getUserInfo();
|
|
@@ -114,7 +119,7 @@ async function createPackageJson(mode, pkg, {
|
|
|
114
119
|
pkg.author = userInfo.username + (userInfo.email ? ` <${userInfo.email}>` : "");
|
|
115
120
|
}
|
|
116
121
|
pkg.license = "MIT";
|
|
117
|
-
pkg.engines = { node: "^18.20.0 || >=
|
|
122
|
+
pkg.engines = { node: "^18.19.0 || ^20.6.0 || >=22.0.0" };
|
|
118
123
|
}
|
|
119
124
|
if (injectNpmScripts) {
|
|
120
125
|
pkg.scripts ??= {};
|
|
@@ -314,6 +319,7 @@ function updateFileListTarget(fileList, target) {
|
|
|
314
319
|
import { createRequire } from "node:module";
|
|
315
320
|
import process3 from "node:process";
|
|
316
321
|
import { cancel, confirm, group, select, text } from "@clack/prompts";
|
|
322
|
+
import { osLocale } from "os-locale";
|
|
317
323
|
|
|
318
324
|
// src/locales/en.ts
|
|
319
325
|
var en = {
|
|
@@ -392,6 +398,15 @@ async function prompt(mode, root) {
|
|
|
392
398
|
}
|
|
393
399
|
const result = await group({
|
|
394
400
|
displayLang: async () => {
|
|
401
|
+
const locale = await osLocale();
|
|
402
|
+
if (locale === "zh-CN" || locale === "zh-Hans") {
|
|
403
|
+
setLang("zh-CN");
|
|
404
|
+
return "zh-CN";
|
|
405
|
+
}
|
|
406
|
+
if (locale === "en-US") {
|
|
407
|
+
setLang("en-US");
|
|
408
|
+
return "en-US";
|
|
409
|
+
}
|
|
395
410
|
const lang = await select({
|
|
396
411
|
message: "Select a language to display / \u9009\u62E9\u663E\u793A\u8BED\u8A00",
|
|
397
412
|
options: languageOptions
|
|
@@ -547,5 +562,5 @@ var cli = cac("create-vuepress-theme-plume");
|
|
|
547
562
|
cli.command("[root]", "create a new vuepress-theme-plume project / \u521B\u5EFA\u65B0\u7684 vuepress-theme-plume \u9879\u76EE").action((root) => run(1 /* create */, root));
|
|
548
563
|
cli.command("init [root]", "Initial vuepress-theme-plume in the existing project / \u5728\u73B0\u6709\u9879\u76EE\u4E2D\u521D\u59CB\u5316 vuepress-theme-plume").action((root) => run(0 /* init */, root));
|
|
549
564
|
cli.help();
|
|
550
|
-
cli.version("1.0.0-rc.
|
|
565
|
+
cli.version("1.0.0-rc.137");
|
|
551
566
|
cli.parse();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-vuepress-theme-plume",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.0-rc.
|
|
4
|
+
"version": "1.0.0-rc.138",
|
|
5
5
|
"description": "The cli for create vuepress-theme-plume's project",
|
|
6
6
|
"author": "pengzhanbo <q942450674@outlook.com> (https://github.com/pengzhanbo/)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -32,15 +32,16 @@
|
|
|
32
32
|
"cac": "^6.7.14",
|
|
33
33
|
"execa": "^9.5.2",
|
|
34
34
|
"handlebars": "^4.7.8",
|
|
35
|
+
"os-locale": "^6.0.2",
|
|
35
36
|
"picocolors": "^1.1.1"
|
|
36
37
|
},
|
|
37
38
|
"plume-deps": {
|
|
38
39
|
"vuepress": "2.0.0-rc.20",
|
|
39
40
|
"vue": "^3.5.13",
|
|
40
|
-
"sass-embedded": "^1.
|
|
41
|
+
"sass-embedded": "^1.86.1",
|
|
41
42
|
"sass-loader": "^16.0.5",
|
|
42
43
|
"http-server": "^14.1.1",
|
|
43
|
-
"typescript": "^5.
|
|
44
|
+
"typescript": "^5.8.2"
|
|
44
45
|
},
|
|
45
46
|
"scripts": {
|
|
46
47
|
"build": "tsup"
|
|
@@ -4,15 +4,29 @@ tags:
|
|
|
4
4
|
- markdown
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
## 标题
|
|
7
|
+
## 标题H2
|
|
8
8
|
|
|
9
|
-
### 标题
|
|
9
|
+
### 标题H3
|
|
10
10
|
|
|
11
|
-
#### 标题
|
|
11
|
+
#### 标题H4
|
|
12
12
|
|
|
13
|
-
##### 标题
|
|
13
|
+
##### 标题H5
|
|
14
14
|
|
|
15
|
-
###### 标题
|
|
15
|
+
###### 标题H6
|
|
16
|
+
|
|
17
|
+
## 标题2 Badge <Badge type="tip" text="Badge" />
|
|
18
|
+
|
|
19
|
+
### 标题3 Badge <Badge type="warning" text="Badge" />
|
|
20
|
+
|
|
21
|
+
#### 标题4 Badge <Badge type="danger" text="Badge" />
|
|
22
|
+
|
|
23
|
+
正文内容。
|
|
24
|
+
|
|
25
|
+
`@property` CSS at-rule是 [CSS Houdini API](https://developer.mozilla.org/zh-CN/docs/Web/Guide/Houdini)
|
|
26
|
+
的一部分,它允许开发者显式地定义他们的 [CSS 自定义属性](https://developer.mozilla.org/zh-CN/docs/Web/CSS/--*),
|
|
27
|
+
允许进行属性类型检查、设定默认值以及定义该自定义属性是否可以被继承。
|
|
28
|
+
|
|
29
|
+
`@property` 的出现,极大的增强了 CSS 的能力。
|
|
16
30
|
|
|
17
31
|
加粗:**加粗文字**
|
|
18
32
|
|
|
@@ -66,6 +80,8 @@ H~2~O
|
|
|
66
80
|
|
|
67
81
|
[外部链接](https://github.com/pengzhanbo)
|
|
68
82
|
|
|
83
|
+

|
|
84
|
+
|
|
69
85
|
**Badge:**
|
|
70
86
|
|
|
71
87
|
- <Badge type="info" text="info badge" />
|
|
@@ -121,6 +137,68 @@ const obj = {
|
|
|
121
137
|
}
|
|
122
138
|
```
|
|
123
139
|
|
|
140
|
+
**Code Blocks TwoSlash:**
|
|
141
|
+
|
|
142
|
+
```ts twoslash
|
|
143
|
+
// @errors: 2339
|
|
144
|
+
const welcome = 'Tudo bem gente?'
|
|
145
|
+
const words = welcome.contains(' ')
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
```ts twoslash
|
|
149
|
+
import express from 'express'
|
|
150
|
+
const app = express()
|
|
151
|
+
app.get('/', (req, res) => {
|
|
152
|
+
res.send
|
|
153
|
+
})
|
|
154
|
+
app.listen(3000)
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
```ts twoslash
|
|
158
|
+
import { createHighlighter } from 'shiki'
|
|
159
|
+
|
|
160
|
+
const highlighter = await createHighlighter({ themes: ['nord'], langs: ['javascript'] })
|
|
161
|
+
// @log: Custom log message
|
|
162
|
+
const a = 1
|
|
163
|
+
// @error: Custom error message
|
|
164
|
+
const b = 1
|
|
165
|
+
// @warn: Custom warning message
|
|
166
|
+
const c = 1
|
|
167
|
+
// @annotate: Custom annotation message
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
```ts twoslash
|
|
171
|
+
// @errors: 2540
|
|
172
|
+
interface Todo {
|
|
173
|
+
title: string
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
const todo: Readonly<Todo> = {
|
|
177
|
+
title: 'Delete inactive users'.toUpperCase(),
|
|
178
|
+
// ^?
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
todo.title = 'Hello'
|
|
182
|
+
|
|
183
|
+
Number.parseInt('123', 10)
|
|
184
|
+
// ^|
|
|
185
|
+
|
|
186
|
+
//
|
|
187
|
+
//
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
```vue twoslash
|
|
191
|
+
<script setup lang="ts">
|
|
192
|
+
import { ref } from 'vue'
|
|
193
|
+
|
|
194
|
+
const count = ref(0)
|
|
195
|
+
</script>
|
|
196
|
+
|
|
197
|
+
<template>
|
|
198
|
+
<p>{{ count }}</p>
|
|
199
|
+
</template>
|
|
200
|
+
```
|
|
201
|
+
|
|
124
202
|
**代码分组:**
|
|
125
203
|
|
|
126
204
|
::: code-tabs
|
|
@@ -166,6 +244,9 @@ function foo() {
|
|
|
166
244
|
}
|
|
167
245
|
```
|
|
168
246
|
|
|
247
|
+
::: tip 仅标题
|
|
248
|
+
:::
|
|
249
|
+
|
|
169
250
|
::: note 注释
|
|
170
251
|
注释内容 [link](https://github.com/pengzhanbo) `inline code`
|
|
171
252
|
|
|
@@ -232,6 +313,11 @@ const c = a + b
|
|
|
232
313
|
|
|
233
314
|
:::
|
|
234
315
|
|
|
316
|
+
::: details 详细标题
|
|
317
|
+
|
|
318
|
+
这里是内容。
|
|
319
|
+
:::
|
|
320
|
+
|
|
235
321
|
**GFM alert:**
|
|
236
322
|
|
|
237
323
|
> [!note]
|