create-vuepress-theme-hope 2.0.0-beta.21 → 2.0.0-beta.211
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/LICENSE +1 -1
- package/README.md +35 -0
- package/lib/index.js +65 -0
- package/package.json +25 -14
- package/template/blog/.vuepress/config.ts +24 -0
- package/template/blog/.vuepress/navbar/en.ts +52 -0
- package/template/blog/.vuepress/navbar/index.ts +2 -0
- package/template/blog/.vuepress/navbar/zh.ts +52 -0
- package/template/blog/.vuepress/public/assets/images/cover1.jpg +0 -0
- package/template/blog/.vuepress/public/assets/images/cover2.jpg +0 -0
- package/template/blog/.vuepress/public/assets/images/cover3.jpg +0 -0
- package/template/blog/.vuepress/sidebar/en.ts +22 -0
- package/template/blog/.vuepress/sidebar/index.ts +2 -0
- package/template/blog/.vuepress/sidebar/zh.ts +22 -0
- package/template/blog/.vuepress/styles/config.scss +3 -0
- package/template/blog/.vuepress/styles/index.scss +1 -0
- package/template/blog/.vuepress/styles/palette.scss +2 -0
- package/template/blog/.vuepress/theme.ts +224 -0
- package/template/{i18n → blog}/README.md +5 -5
- package/template/{i18n/guide → blog/demo}/README.md +5 -4
- package/template/{i18n/guide → blog/demo}/disable.md +4 -4
- package/template/{i18n/guide → blog/demo}/encrypt.md +1 -1
- package/template/blog/demo/markdown.md +423 -0
- package/template/blog/demo/page.md +74 -0
- package/template/blog/intro.md +8 -0
- package/template/{i18n/posts/article/article1.md → blog/posts/apple/1.md} +5 -4
- package/template/{en-US/posts/article/article2.md → blog/posts/apple/2.md} +9 -4
- package/template/{i18n/posts/article/article3.md → blog/posts/apple/3.md} +6 -5
- package/template/{i18n/posts/article/article4.md → blog/posts/apple/4.md} +6 -5
- package/template/{en-US/posts/article/article5.md → blog/posts/banana/1.md} +6 -5
- package/template/{en-US/posts/article/article6.md → blog/posts/banana/2.md} +10 -5
- package/template/{i18n/posts/article/article7.md → blog/posts/banana/3.md} +5 -5
- package/template/{i18n/posts/article/article8.md → blog/posts/banana/4.md} +5 -5
- package/template/{i18n/posts/article9.md → blog/posts/cherry.md} +5 -5
- package/template/{i18n/posts/article10.md → blog/posts/dragonfruit.md} +5 -5
- package/template/{i18n/posts/article11.md → blog/posts/strawberry.md} +5 -5
- package/template/{en-US/posts/article12.md → blog/posts/tomato.md} +6 -5
- package/template/{i18n/slide.md → blog/slides.md} +8 -8
- package/template/{i18n → blog}/zh/README.md +4 -4
- package/template/{i18n/zh/guide → blog/zh/demo}/README.md +5 -4
- package/template/{i18n/zh/guide → blog/zh/demo}/disable.md +4 -4
- package/template/blog/zh/demo/markdown.md +403 -0
- package/template/blog/zh/demo/page.md +74 -0
- package/template/blog/zh/intro.md +8 -0
- package/template/{i18n/zh/posts/article/article1.md → blog/zh/posts/apple/1.md} +5 -4
- package/template/{zh-CN/posts/article/article2.md → blog/zh/posts/apple/2.md} +9 -4
- package/template/{i18n/zh/posts/article/article3.md → blog/zh/posts/apple/3.md} +6 -5
- package/template/{zh-CN/posts/article/article4.md → blog/zh/posts/apple/4.md} +6 -5
- package/template/{i18n/zh/posts/article/article5.md → blog/zh/posts/banana/1.md} +6 -5
- package/template/{i18n/zh/posts/article/article6.md → blog/zh/posts/banana/2.md} +10 -5
- package/template/{i18n/zh/posts/article/article7.md → blog/zh/posts/banana/3.md} +5 -5
- package/template/{i18n/zh/posts/article/article8.md → blog/zh/posts/banana/4.md} +5 -5
- package/template/{i18n/zh/posts/article9.md → blog/zh/posts/cherry.md} +5 -5
- package/template/{i18n/zh/posts/article10.md → blog/zh/posts/dragonfruit.md} +5 -5
- package/template/{i18n/zh/posts/article11.md → blog/zh/posts/strawberry.md} +5 -5
- package/template/{i18n/zh/posts/article12.md → blog/zh/posts/tomato.md} +6 -5
- package/template/{i18n/zh/slide.md → blog/zh/slides.md} +1 -1
- package/template/docs/.vuepress/config.ts +24 -0
- package/template/docs/.vuepress/navbar/en.ts +30 -0
- package/template/docs/.vuepress/navbar/index.ts +2 -0
- package/template/docs/.vuepress/navbar/zh.ts +30 -0
- package/template/docs/.vuepress/sidebar/en.ts +21 -0
- package/template/docs/.vuepress/sidebar/index.ts +2 -0
- package/template/docs/.vuepress/sidebar/zh.ts +21 -0
- package/template/docs/.vuepress/styles/config.scss +3 -0
- package/template/docs/.vuepress/styles/index.scss +1 -0
- package/template/docs/.vuepress/styles/palette.scss +2 -0
- package/template/docs/.vuepress/theme.ts +172 -0
- package/template/{en-US/home.md → docs/README.md} +28 -28
- package/template/{en-US/guide → docs/demo}/README.md +5 -4
- package/template/{en-US/guide → docs/demo}/disable.md +4 -4
- package/template/{en-US/guide → docs/demo}/encrypt.md +1 -1
- package/template/docs/demo/markdown.md +423 -0
- package/template/docs/demo/page.md +72 -0
- package/template/docs/guide/README.md +16 -0
- package/template/docs/guide/bar/README.md +13 -0
- package/template/docs/guide/bar/baz.md +6 -0
- package/template/docs/guide/foo/README.md +13 -0
- package/template/docs/guide/foo/ray.md +6 -0
- package/template/{en-US/slide.md → docs/slides.md} +8 -8
- package/template/{i18n/zh/home.md → docs/zh/README.md} +24 -24
- package/template/{zh-CN/guide → docs/zh/demo}/README.md +5 -4
- package/template/{zh-CN/guide → docs/zh/demo}/disable.md +4 -4
- package/template/docs/zh/demo/markdown.md +403 -0
- package/template/docs/zh/demo/page.md +72 -0
- package/template/docs/zh/guide/README.md +16 -0
- package/template/docs/zh/guide/bar/README.md +13 -0
- package/template/docs/zh/guide/bar/baz.md +6 -0
- package/template/docs/zh/guide/foo/README.md +13 -0
- package/template/docs/zh/guide/foo/ray.md +6 -0
- package/template/{zh-CN/slide.md → docs/zh/slides.md} +1 -1
- package/template/public/assets/icon/apple-icon-152.png +0 -0
- package/template/public/assets/icon/chrome-192.png +0 -0
- package/template/public/assets/icon/chrome-512.png +0 -0
- package/template/public/assets/icon/chrome-mask-192.png +0 -0
- package/template/public/assets/icon/chrome-mask-512.png +0 -0
- package/template/public/assets/icon/guide-maskable.png +0 -0
- package/template/public/assets/icon/ms-icon-144.png +0 -0
- package/CHANGELOG.md +0 -184
- package/lib/node/index.d.ts +0 -1
- package/lib/node/index.js +0 -3
- package/lib/node/index.js.map +0 -1
- package/readme.md +0 -33
- package/rollup.config.js +0 -14
- package/src/node/checkVersion.ts +0 -31
- package/src/node/copy.ts +0 -45
- package/src/node/deepAssign.ts +0 -42
- package/src/node/hasYarn.ts +0 -10
- package/src/node/i18n.ts +0 -91
- package/src/node/index.ts +0 -177
- package/src/node/registry.ts +0 -31
- package/template/en-US/.vuepress/config.ts +0 -28
- package/template/en-US/.vuepress/navbar.ts +0 -52
- package/template/en-US/.vuepress/sidebar.ts +0 -46
- package/template/en-US/.vuepress/styles/index.scss +0 -0
- package/template/en-US/.vuepress/styles/palette.scss +0 -0
- package/template/en-US/.vuepress/themeConfig.ts +0 -96
- package/template/en-US/README.md +0 -48
- package/template/en-US/guide/markdown.md +0 -341
- package/template/en-US/guide/page.md +0 -66
- package/template/en-US/intro.md +0 -7
- package/template/en-US/posts/article/article1.md +0 -19
- package/template/en-US/posts/article/article3.md +0 -20
- package/template/en-US/posts/article/article4.md +0 -20
- package/template/en-US/posts/article/article7.md +0 -20
- package/template/en-US/posts/article/article8.md +0 -20
- package/template/en-US/posts/article10.md +0 -20
- package/template/en-US/posts/article11.md +0 -20
- package/template/en-US/posts/article9.md +0 -20
- package/template/i18n/.vuepress/config.ts +0 -33
- package/template/i18n/.vuepress/navbar/en.ts +0 -52
- package/template/i18n/.vuepress/navbar/index.ts +0 -2
- package/template/i18n/.vuepress/navbar/zh.ts +0 -52
- package/template/i18n/.vuepress/public/favicon.ico +0 -0
- package/template/i18n/.vuepress/public/logo.png +0 -0
- package/template/i18n/.vuepress/public/logo.svg +0 -1
- package/template/i18n/.vuepress/sidebar/en.ts +0 -48
- package/template/i18n/.vuepress/sidebar/index.ts +0 -2
- package/template/i18n/.vuepress/sidebar/zh.ts +0 -48
- package/template/i18n/.vuepress/styles/index.scss +0 -0
- package/template/i18n/.vuepress/styles/palette.scss +0 -0
- package/template/i18n/.vuepress/themeConfig.ts +0 -124
- package/template/i18n/guide/markdown.md +0 -341
- package/template/i18n/guide/page.md +0 -66
- package/template/i18n/home.md +0 -110
- package/template/i18n/intro.md +0 -7
- package/template/i18n/posts/article/article2.md +0 -20
- package/template/i18n/posts/article/article5.md +0 -20
- package/template/i18n/posts/article/article6.md +0 -21
- package/template/i18n/posts/article12.md +0 -21
- package/template/i18n/zh/guide/markdown.md +0 -339
- package/template/i18n/zh/guide/page.md +0 -66
- package/template/i18n/zh/posts/article/article2.md +0 -20
- package/template/i18n/zh/posts/article/article4.md +0 -20
- package/template/zh-CN/.vuepress/config.ts +0 -28
- package/template/zh-CN/.vuepress/navbar.ts +0 -52
- package/template/zh-CN/.vuepress/public/favicon.ico +0 -0
- package/template/zh-CN/.vuepress/public/logo.png +0 -0
- package/template/zh-CN/.vuepress/public/logo.svg +0 -1
- package/template/zh-CN/.vuepress/sidebar.ts +0 -46
- package/template/zh-CN/.vuepress/styles/index.scss +0 -0
- package/template/zh-CN/.vuepress/styles/palette.scss +0 -0
- package/template/zh-CN/.vuepress/themeConfig.ts +0 -96
- package/template/zh-CN/README.md +0 -48
- package/template/zh-CN/guide/markdown.md +0 -339
- package/template/zh-CN/guide/page.md +0 -66
- package/template/zh-CN/home.md +0 -109
- package/template/zh-CN/posts/article/article1.md +0 -19
- package/template/zh-CN/posts/article/article3.md +0 -20
- package/template/zh-CN/posts/article/article5.md +0 -20
- package/template/zh-CN/posts/article/article6.md +0 -21
- package/template/zh-CN/posts/article/article7.md +0 -20
- package/template/zh-CN/posts/article/article8.md +0 -20
- package/template/zh-CN/posts/article10.md +0 -20
- package/template/zh-CN/posts/article11.md +0 -20
- package/template/zh-CN/posts/article12.md +0 -21
- package/template/zh-CN/posts/article9.md +0 -20
- package/tsconfig.build.json +0 -10
- package/tsconfig.json +0 -8
- /package/template/{i18n/zh/guide → blog/zh/demo}/encrypt.md +0 -0
- /package/template/{zh-CN/guide → docs/zh/demo}/encrypt.md +0 -0
- /package/template/{en-US/.vuepress/public → public}/favicon.ico +0 -0
- /package/template/{en-US/.vuepress/public → public}/logo.png +0 -0
- /package/template/{en-US/.vuepress/public → public}/logo.svg +0 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
# 这是文章的标题
|
|
3
|
+
title: 页面配置
|
|
4
|
+
# 这是页面的图标
|
|
5
|
+
icon: page
|
|
6
|
+
# 这是侧边栏的顺序
|
|
7
|
+
order: 1
|
|
8
|
+
# 设置作者
|
|
9
|
+
author: Ms.Hope
|
|
10
|
+
# 设置写作时间
|
|
11
|
+
date: 2020-01-01
|
|
12
|
+
# 一个页面可以有多个分类
|
|
13
|
+
category:
|
|
14
|
+
- 使用指南
|
|
15
|
+
# 一个页面可以有多个标签
|
|
16
|
+
tag:
|
|
17
|
+
- 页面配置
|
|
18
|
+
- 使用指南
|
|
19
|
+
# 此页面会在文章列表置顶
|
|
20
|
+
sticky: true
|
|
21
|
+
# 此页面会出现在文章收藏中
|
|
22
|
+
star: true
|
|
23
|
+
# 你可以自定义页脚
|
|
24
|
+
footer: 这是测试显示的页脚
|
|
25
|
+
# 你可以自定义版权信息
|
|
26
|
+
copyright: 无版权
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
`more` 注释之前的内容被视为文章摘要。
|
|
30
|
+
|
|
31
|
+
<!-- more -->
|
|
32
|
+
|
|
33
|
+
## 页面信息
|
|
34
|
+
|
|
35
|
+
你可以在 Markdown 的 Frontmatter 中设置页面信息。
|
|
36
|
+
|
|
37
|
+
- 作者设置为 Ms.Hope。
|
|
38
|
+
- 写作日期为 2020 年 1 月 1 日
|
|
39
|
+
- 分类为 “使用指南”
|
|
40
|
+
- 标签为 “页面配置” 和 “使用指南”
|
|
41
|
+
|
|
42
|
+
## 页面内容
|
|
43
|
+
|
|
44
|
+
你可以自由在这里书写你的 Markdown。
|
|
45
|
+
|
|
46
|
+
::: tip
|
|
47
|
+
|
|
48
|
+
- 你可以将图片和 Markdown 文件放置在一起,但是你需要使用**相对链接**`./` 进行引用。
|
|
49
|
+
|
|
50
|
+
- 对于 `.vuepress/public` 文件夹的图片,请使用绝对链接 `/` 进行引用。
|
|
51
|
+
|
|
52
|
+
:::
|
|
53
|
+
|
|
54
|
+
主题包含了一个自定义徽章可以使用:
|
|
55
|
+
|
|
56
|
+
> 文字结尾应该有深蓝色的 徽章文字 徽章。 <Badge text="徽章文字" color="#242378" />
|
|
57
|
+
|
|
58
|
+
## 页面结构
|
|
59
|
+
|
|
60
|
+
此页面应当包含:
|
|
61
|
+
|
|
62
|
+
- [路径导航](https://theme-hope.vuejs.press/zh/guide/layout/breadcrumb.html)
|
|
63
|
+
- [标题和页面信息](https://theme-hope.vuejs.press/zh/guide/feature/page-info.html)
|
|
64
|
+
- [TOC (文章标题列表)](https://theme-hope.vuejs.press/zh/guide/layout/page.html#标题列表)
|
|
65
|
+
- [贡献者、更新时间等页面元信息](https://theme-hope.vuejs.press/guide/feature/meta.html)
|
|
66
|
+
- [评论](https://theme-hope.vuejs.press/zh/guide/feature/comment.html)
|
|
67
|
+
- [导航栏](https://theme-hope.vuejs.press/zh/guide/layout/navbar.html)
|
|
68
|
+
- [侧边栏](https://theme-hope.vuejs.press/zh/guide/layout/sidebar.html)
|
|
69
|
+
- [页脚](https://theme-hope.vuejs.press/zh/guide/layout/footer.html)
|
|
70
|
+
- 返回顶部按钮
|
|
71
|
+
|
|
72
|
+
你可以通过主题选项和页面 Frontmatter 自定义它们。
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/CHANGELOG.md
DELETED
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
# [2.0.0-beta.21](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-beta.20...v2.0.0-beta.21) (2022-03-19)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package create-vuepress-theme-hope
|
|
9
|
-
|
|
10
|
-
# [2.0.0-beta.20](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-beta.19...v2.0.0-beta.20) (2022-03-19)
|
|
11
|
-
|
|
12
|
-
**Note:** Version bump only for package create-vuepress-theme-hope
|
|
13
|
-
|
|
14
|
-
# [2.0.0-beta.19](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-beta.18...v2.0.0-beta.19) (2022-03-18)
|
|
15
|
-
|
|
16
|
-
**Note:** Version bump only for package create-vuepress-theme-hope
|
|
17
|
-
|
|
18
|
-
# [2.0.0-beta.18](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-beta.17...v2.0.0-beta.18) (2022-03-18)
|
|
19
|
-
|
|
20
|
-
**Note:** Version bump only for package create-vuepress-theme-hope
|
|
21
|
-
|
|
22
|
-
# [2.0.0-beta.17](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-beta.16...v2.0.0-beta.17) (2022-03-17)
|
|
23
|
-
|
|
24
|
-
**Note:** Version bump only for package create-vuepress-theme-hope
|
|
25
|
-
|
|
26
|
-
# [2.0.0-beta.16](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-beta.15...v2.0.0-beta.16) (2022-03-15)
|
|
27
|
-
|
|
28
|
-
**Note:** Version bump only for package create-vuepress-theme-hope
|
|
29
|
-
|
|
30
|
-
# [2.0.0-beta.15](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-beta.14...v2.0.0-beta.15) (2022-03-14)
|
|
31
|
-
|
|
32
|
-
**Note:** Version bump only for package create-vuepress-theme-hope
|
|
33
|
-
|
|
34
|
-
# [2.0.0-beta.14](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-beta.13...v2.0.0-beta.14) (2022-03-13)
|
|
35
|
-
|
|
36
|
-
**Note:** Version bump only for package create-vuepress-theme-hope
|
|
37
|
-
|
|
38
|
-
# [2.0.0-beta.13](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-beta.12...v2.0.0-beta.13) (2022-03-12)
|
|
39
|
-
|
|
40
|
-
**Note:** Version bump only for package create-vuepress-theme-hope
|
|
41
|
-
|
|
42
|
-
# [2.0.0-beta.12](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-beta.11...v2.0.0-beta.12) (2022-03-12)
|
|
43
|
-
|
|
44
|
-
### Features
|
|
45
|
-
|
|
46
|
-
- **md-enhance:** new `chart` optoin ([6742945](https://github.com/vuepress-theme-hope/vuepress-theme-hope/commit/6742945d802e21babb1f3b2b1dfc797c7bd17877))
|
|
47
|
-
|
|
48
|
-
# [2.0.0-beta.11](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-beta.10...v2.0.0-beta.11) (2022-03-12)
|
|
49
|
-
|
|
50
|
-
**Note:** Version bump only for package create-vuepress-theme-hope
|
|
51
|
-
|
|
52
|
-
# [2.0.0-beta.10](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-beta.9...v2.0.0-beta.10) (2022-03-11)
|
|
53
|
-
|
|
54
|
-
**Note:** Version bump only for package create-vuepress-theme-hope
|
|
55
|
-
|
|
56
|
-
# [2.0.0-beta.9](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-beta.8...v2.0.0-beta.9) (2022-03-10)
|
|
57
|
-
|
|
58
|
-
**Note:** Version bump only for package create-vuepress-theme-hope
|
|
59
|
-
|
|
60
|
-
# [2.0.0-beta.8](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-beta.7...v2.0.0-beta.8) (2022-03-10)
|
|
61
|
-
|
|
62
|
-
**Note:** Version bump only for package create-vuepress-theme-hope
|
|
63
|
-
|
|
64
|
-
# [2.0.0-beta.7](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-beta.6...v2.0.0-beta.7) (2022-03-09)
|
|
65
|
-
|
|
66
|
-
**Note:** Version bump only for package create-vuepress-theme-hope
|
|
67
|
-
|
|
68
|
-
# [2.0.0-beta.6](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-beta.5...v2.0.0-beta.6) (2022-03-08)
|
|
69
|
-
|
|
70
|
-
**Note:** Version bump only for package create-vuepress-theme-hope
|
|
71
|
-
|
|
72
|
-
# [2.0.0-beta.5](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-beta.4...v2.0.0-beta.5) (2022-03-07)
|
|
73
|
-
|
|
74
|
-
**Note:** Version bump only for package create-vuepress-theme-hope
|
|
75
|
-
|
|
76
|
-
# [2.0.0-beta.4](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-beta.3...v2.0.0-beta.4) (2022-03-06)
|
|
77
|
-
|
|
78
|
-
### Features
|
|
79
|
-
|
|
80
|
-
- **create:** update template ([fc6c344](https://github.com/vuepress-theme-hope/vuepress-theme-hope/commit/fc6c344ed6ff5d546646c178fe3a401ee607e35b))
|
|
81
|
-
|
|
82
|
-
# [2.0.0-beta.3](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-beta.2...v2.0.0-beta.3) (2022-03-05)
|
|
83
|
-
|
|
84
|
-
### Features
|
|
85
|
-
|
|
86
|
-
- **create:** remove pwa feature in template ([5574303](https://github.com/vuepress-theme-hope/vuepress-theme-hope/commit/5574303cffe5750945fe5cbaa659855eb539af01))
|
|
87
|
-
|
|
88
|
-
# [2.0.0-beta.2](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-beta.1...v2.0.0-beta.2) (2022-03-04)
|
|
89
|
-
|
|
90
|
-
**Note:** Version bump only for package create-vuepress-theme-hope
|
|
91
|
-
|
|
92
|
-
# [2.0.0-beta.1](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-beta.0...v2.0.0-beta.1) (2022-03-04)
|
|
93
|
-
|
|
94
|
-
**Note:** Version bump only for package create-vuepress-theme-hope
|
|
95
|
-
|
|
96
|
-
# [2.0.0-beta.0](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-alpha.41...v2.0.0-beta.0) (2022-03-03)
|
|
97
|
-
|
|
98
|
-
**Note:** Version bump only for package create-vuepress-theme-hope
|
|
99
|
-
|
|
100
|
-
# [2.0.0-alpha.41](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-alpha.40...v2.0.0-alpha.41) (2022-03-02)
|
|
101
|
-
|
|
102
|
-
**Note:** Version bump only for package create-vuepress-theme-hope
|
|
103
|
-
|
|
104
|
-
# [2.0.0-alpha.40](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-alpha.39...v2.0.0-alpha.40) (2022-03-02)
|
|
105
|
-
|
|
106
|
-
**Note:** Version bump only for package create-vuepress-theme-hope
|
|
107
|
-
|
|
108
|
-
# [2.0.0-alpha.39](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-alpha.38...v2.0.0-alpha.39) (2022-03-01)
|
|
109
|
-
|
|
110
|
-
**Note:** Version bump only for package create-vuepress-theme-hope
|
|
111
|
-
|
|
112
|
-
# [2.0.0-alpha.38](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-alpha.37...v2.0.0-alpha.38) (2022-02-28)
|
|
113
|
-
|
|
114
|
-
**Note:** Version bump only for package create-vuepress-theme-hope
|
|
115
|
-
|
|
116
|
-
# [2.0.0-alpha.37](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-alpha.36...v2.0.0-alpha.37) (2022-02-28)
|
|
117
|
-
|
|
118
|
-
**Note:** Version bump only for package create-vuepress-theme-hope
|
|
119
|
-
|
|
120
|
-
# [2.0.0-alpha.36](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-alpha.35...v2.0.0-alpha.36) (2022-02-27)
|
|
121
|
-
|
|
122
|
-
**Note:** Version bump only for package create-vuepress-theme-hope
|
|
123
|
-
|
|
124
|
-
# [2.0.0-alpha.35](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-alpha.34...v2.0.0-alpha.35) (2022-02-27)
|
|
125
|
-
|
|
126
|
-
**Note:** Version bump only for package create-vuepress-theme-hope
|
|
127
|
-
|
|
128
|
-
# [2.0.0-alpha.34](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-alpha.33...v2.0.0-alpha.34) (2022-02-24)
|
|
129
|
-
|
|
130
|
-
**Note:** Version bump only for package create-vuepress-theme-hope
|
|
131
|
-
|
|
132
|
-
# [2.0.0-alpha.33](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-alpha.32...v2.0.0-alpha.33) (2022-02-22)
|
|
133
|
-
|
|
134
|
-
**Note:** Version bump only for package create-vuepress-theme-hope
|
|
135
|
-
|
|
136
|
-
# [2.0.0-alpha.32](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-alpha.31...v2.0.0-alpha.32) (2022-02-20)
|
|
137
|
-
|
|
138
|
-
**Note:** Version bump only for package create-vuepress-theme-hope
|
|
139
|
-
|
|
140
|
-
# [2.0.0-alpha.31](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-alpha.30...v2.0.0-alpha.31) (2022-02-20)
|
|
141
|
-
|
|
142
|
-
**Note:** Version bump only for package create-vuepress-theme-hope
|
|
143
|
-
|
|
144
|
-
# [2.0.0-alpha.30](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-alpha.29...v2.0.0-alpha.30) (2022-02-20)
|
|
145
|
-
|
|
146
|
-
**Note:** Version bump only for package create-vuepress-theme-hope
|
|
147
|
-
|
|
148
|
-
# [2.0.0-alpha.29](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-alpha.28...v2.0.0-alpha.29) (2022-02-19)
|
|
149
|
-
|
|
150
|
-
### Bug Fixes
|
|
151
|
-
|
|
152
|
-
- **create:** fix locale language ([23bcf44](https://github.com/vuepress-theme-hope/vuepress-theme-hope/commit/23bcf44fadd6b63c4c4696a8b6a61d11efae0d6a))
|
|
153
|
-
|
|
154
|
-
# [2.0.0-alpha.28](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-alpha.27...v2.0.0-alpha.28) (2022-02-19)
|
|
155
|
-
|
|
156
|
-
### Bug Fixes
|
|
157
|
-
|
|
158
|
-
- **create:** fix command ([ee2c91d](https://github.com/vuepress-theme-hope/vuepress-theme-hope/commit/ee2c91d9b8eeb6af627457db889dccacb03835d8))
|
|
159
|
-
|
|
160
|
-
### Features
|
|
161
|
-
|
|
162
|
-
- **create:** add i18n support ([4605db5](https://github.com/vuepress-theme-hope/vuepress-theme-hope/commit/4605db5261b442281ce1f80c7cdc3af122b22c90))
|
|
163
|
-
|
|
164
|
-
# [2.0.0-alpha.27](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-alpha.26...v2.0.0-alpha.27) (2022-02-16)
|
|
165
|
-
|
|
166
|
-
### Bug Fixes
|
|
167
|
-
|
|
168
|
-
- **create:** fix template folder path ([3fcc980](https://github.com/vuepress-theme-hope/vuepress-theme-hope/commit/3fcc980865c14a74c54bc7950e93cadab3da2d00))
|
|
169
|
-
|
|
170
|
-
# [2.0.0-alpha.26](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-alpha.25...v2.0.0-alpha.26) (2022-02-16)
|
|
171
|
-
|
|
172
|
-
**Note:** Version bump only for package create-vuepress-theme-hope
|
|
173
|
-
|
|
174
|
-
# [2.0.0-alpha.25](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-alpha.24...v2.0.0-alpha.25) (2022-02-16)
|
|
175
|
-
|
|
176
|
-
### Bug Fixes
|
|
177
|
-
|
|
178
|
-
- **create:** fix command ([cc9cb54](https://github.com/vuepress-theme-hope/vuepress-theme-hope/commit/cc9cb54f5b274c2e186e50ec53353caa3d997d33))
|
|
179
|
-
|
|
180
|
-
# [2.0.0-alpha.24](https://github.com/vuepress-theme-hope/vuepress-theme-hope/compare/v2.0.0-alpha.23...v2.0.0-alpha.24) (2022-02-16)
|
|
181
|
-
|
|
182
|
-
### Features
|
|
183
|
-
|
|
184
|
-
- add create-vuepress-theme-hope helper ([92333cf](https://github.com/vuepress-theme-hope/vuepress-theme-hope/commit/92333cfa468571887e285e6d545cdbc97e79bf26))
|
package/lib/node/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
package/lib/node/index.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";var e=require("fs"),s=require("path"),r=require("cac"),t=require("inquirer"),a=require("execa"),n=require("https");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=o(a);const c=(e,...s)=>{if(0===s.length)return e;const r=s.shift()||{};return Object.keys(r).forEach((s=>{"object"!=typeof e[s]||Array.isArray(e[s])||"object"!=typeof r[s]||Array.isArray(r[s])?"object"==typeof r[s]?Array.isArray(r[s])?e[s]=[...r[s]]:e[s]={...r[s]}:e[s]=r[s]:c(e[s],r[s])})),c(e,...s)},p=s=>{try{e.readdirSync(s)}catch(r){e.mkdirSync(s)}},l=(r,t)=>{const a=s.dirname(t);p(a);const n=e.createReadStream(r),o=e.createWriteStream(t);n.pipe(o)},u=(s,r)=>{p(r);e.readdirSync(s,{withFileTypes:!0}).forEach((e=>{e.isFile()?l(`${s}/${e.name}`,`${r}/${e.name}`):e.isDirectory()&&u(`${s}/${e.name}`,`${r}/${e.name}`)}))},d=e=>new Promise(((s,r)=>{n.get(`https://registry.npmjs.org/-/package/${e}/dist-tags`,(t=>{if(200===t.statusCode){let e="";t.on("data",(s=>e+=s)),t.on("end",(()=>{s(JSON.parse(e).next)}))}else r(new Error(`Get ${e} version failed, please check your network!`))})).on("error",(()=>{r(new Error(`Get ${e} version failed, please check your network!`))}))})),g={"zh-CN":{getVersion:"获取依赖的最新版本...",createPackage:"生成 package.json...",updatePackage:"更新 package.json...",template:"生成模板...",wait:"这可能需要数分钟,请耐心等待.\n我们无法正确输出子进程的进度条,所以进程可能会看似未响应",install:"安装依赖...",success:"模板已成功生成!",devServerAsk:"是否想要现在启动 Demo 查看?",devServer:"启动开发服务器...\n启动成功后,请在浏览器输入给出的开发服务器地址(默认为 'localhost:8080')",hint:'提示: 请使用 "yarn run docs:dev" 命令启动开发服务器',nameMessage:"设置应用名称",nameError:"应用名称应只包含小写字母、数字和连接线 (-)",versionMessage:"设置应用版本号",versionError:"此版本无效,版本号应为 'x.x.x'",descriptionMessage:"设置应用描述",licenseMessage:"设置协议",i18nMessage:"项目需要用到多语言么?"},"en-US":{getVersion:"Getting lastest version of deps...",createPackage:"Generating package.json...",updatePackage:"Updating package.json...",template:"Generating Template...",wait:"This may take a few minutes, please be patient.\nWe can not correctly output progress bar from child process, so the process may look stuck.",install:"Installing Deps...",success:"Successful Generated!",devServerAsk:"Would you like to preview template now?",devServer:"Staring dev server...\nAfter the dev server starts running, please visit the given server link ('localhost:8080' by default)",hint:'Hint: You should execute "yarn run docs:dev" to start dev server.',nameMessage:"Your project name",nameError:"package name should only contain lowercase characters, numbers and dash",versionMessage:"Your project version",versionError:"This version is not a valid one. Version should be like 'x.x.x'",descriptionMessage:"Your project description",licenseMessage:"Your project lincense",i18nMessage:"Does the project need mutiple languages?"}},m=async()=>{const{language:e}=await t.prompt([{name:"language",type:"list",message:"Select a language to display",choices:["en-US","zh-CN"]}]);return{lang:e,message:g[e]}},v=async(e,s)=>{const r=(e=>a.sync(e?"yarn":"npm",["config","get","registry"]).stdout)(s);if("en-US"===e||"https://registry.npmmirror.com/"===r)return r;const{registry:n}=await t.prompt([{name:"registry",type:"list",message:"选择你想使用的源",choices:["国内镜像源","当前源"]}]);return"国内镜像源"===n?"https://registry.npmmirror.com/":r},y=r.cac("vuepress-theme-hope"),h=(()=>{try{return a.sync("yarn --version",{stdio:"ignore"}),!0}catch(e){return!1}})()?"yarn":"npm";y.command("[dir]","Generate a new vuepress-theme-hope project").action((async r=>{if(!r)return y.outputHelp();const{lang:a,message:n}=await m(),o=s.resolve(process.cwd(),r),p=s.resolve(process.cwd(),"package.json"),g={"docs:build":`vuepress build ${r}`,"docs:clean-dev":`vuepress dev ${r} --clean-cache`,"docs:dev":`vuepress dev ${r}`};console.log(n.getVersion);const f={vuepress:`^${await d("vuepress")}`,"vuepress-theme-hope":`^${await d("vuepress-theme-hope")}`};if(e.existsSync(o)||e.mkdirSync(o),e.existsSync(p)){console.log(n.updatePackage);const s=JSON.parse(e.readFileSync(p,{encoding:"utf-8"}));c(s,{scripts:g,devDependencies:f}),e.writeFileSync(p,`${JSON.stringify(s,null,2)}\n`,{encoding:"utf-8"})}else{console.log(n.createPackage);const s={...await t.prompt([{name:"name",type:"input",message:n.nameMessage,default:"vuepress-theme-hope-template",validate:e=>!!/^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/u.exec(e)||n.nameError},{name:"version",type:"input",message:n.versionMessage,default:"2.0.0",validate:e=>!!/^[0-9]+\.[0-9]+\.(?:[0=9]+|[0-9]+-[a-z]+\.[0-9])$/u.exec(e)||n.versionError},{name:"description",type:"input",message:n.descriptionMessage,default:"A project of vuepress-theme-hope"},{name:"license",type:"input",message:n.licenseMessage,default:"MIT"}]),scripts:g,devDependencies:f};e.writeFileSync(p,`${JSON.stringify(s,null,2)}\n`,{encoding:"utf-8"})}const{i18n:w}=await t.prompt([{name:"i18n",type:"list",message:n.i18nMessage,choices:["Yes","No"]}]);console.log(n.template);const k="Yes"===w?"i18n":a;var S,$;S=s.resolve(__dirname,"../../template",k),$=s.resolve(process.cwd(),r),e.statSync(S).isDirectory()?u(S,$):e.statSync(S).isFile()&&l(S,$),console.log(n.install),console.warn(n.wait);const j=await v(a,h);i.default.sync(h,["install","--registry",j],{stdout:"inherit"}),console.log(n.success);const{choise:M}=await t.prompt([{name:"choise",type:"list",message:n.devServerAsk,choices:["Yes","No"]}]);"Yes"===M?(console.log(n.devServer),await i.default(h,["run","docs:dev"],{stdout:"inherit"})):console.log(n.hint)})),y.help((()=>[{title:"yarn create vuepress-theme-hope <dir> / npm init vuepress-theme-hope <dir>",body:"Create a vuepress-theme-hope template in <dir>"}])),y.parse();
|
|
3
|
-
//# sourceMappingURL=index.js.map
|
package/lib/node/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/node/deepAssign.ts","../../src/node/copy.ts","../../src/node/checkVersion.ts","../../src/node/i18n.ts","../../src/node/registry.ts","../../src/node/index.ts","../../src/node/hasYarn.ts"],"sourcesContent":[null,null,null,null,null,null,null],"names":["deepAssign","originObject","assignObjects","length","assignObject","shift","Object","keys","forEach","property","Array","isArray","ensureDirExistSync","dirPath","readdirSync","err","mkdirSync","copyFile","srcFile","targetFile","targetDir","dirname","rs","createReadStream","ws","createWriteStream","pipe","copyDir","srcDir","withFileTypes","file","isFile","name","isDirectory","checkForNextVersion","packageName","Promise","resolve","reject","get","res","statusCode","body","on","data","JSON","parse","next","Error","i18n","getVersion","createPackage","updatePackage","template","wait","install","success","devServerAsk","devServer","hint","nameMessage","nameError","versionMessage","versionError","descriptionMessage","licenseMessage","i18nMessage","getLanguage","async","language","prompt","type","message","choices","lang","getRegistry","bin","userRegistry","sync","stdout","getUserRegistry","registry","cli","cac","stdio","e","detectYarn","command","action","dir","outputHelp","targetFolder","process","cwd","packageJsonPath","scripts","console","log","devDependencies","vuepress","existsSync","packageContent","readFileSync","encoding","writeFileSync","stringify","default","validate","input","exec","templateFolder","src","target","__dirname","statSync","warn","execa","choise","help","title"],"mappings":";mNAIO,MAAMA,EAAa,CAKxBC,KACGC,KAEH,GAA6B,IAAzBA,EAAcC,OAAc,OAAOF,EAGvC,MAAMG,EAAgBF,EAAcG,SAA0B,GAyB9D,OA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uC,KAAM,OACNC,QAASA,EAAQN,YACjBO,QAAS,CAAC,MAAO,SAIrBuB,QAAQC,IAAIzB,EAAQnB,UAEpB,MAAMyD,EAA0B,QAAT7D,EAAiB,OAASyB,EJ3FjC,IAACqC,EAAaC,EAAbD,EI8Ff1E,EAAOA,QAAC4E,UAAW,iBAAkBH,GJ9FTE,EI+F5B3E,EAAOA,QAACuD,QAAQC,MAAOJ,GJ9FvByB,EAAQA,SAACH,GAAK9E,cAAeN,EAAQoF,EAAKC,GACrCE,EAAQA,SAACH,GAAKhF,UAAUd,EAAS8F,EAAKC,GIgG7ChB,QAAQC,IAAIzB,EAAQjB,SACpByC,QAAQmB,KAAK3C,EAAQlB,MAErB,MAAM2B,QAAiBN,EAAYD,EAAME,GAEzCwC,EAAK,QAACtC,KAAKF,EAAK,CAAC,UAAW,aAAcK,GAAW,CACnDF,OAAQ,YAGViB,QAAQC,IAAIzB,EAAQhB,SAEpB,MAAM6D,OAAEA,SAAiB/C,SAAiC,CACxD,CACEtC,KAAM,SACNuC,KAAM,OACNC,QAASA,EAAQf,aACjBgB,QAAS,CAAC,MAAO,SAIN,QAAX4C,GACFrB,QAAQC,IAAIzB,EAAQd,iBAEd0D,EAAK,QAACxC,EAAK,CAAC,MAAO,YAAa,CACpCG,OAAQ,aAELiB,QAAQC,IAAIzB,EAAQb,SAG/BuB,EAAIoC,MAAK,IAAM,CACb,CACEC,MACE,6EACF7E,KAAM,qDAIVwC,EAAIpC"}
|
package/readme.md
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# create-vuepress-theme-hope
|
|
2
|
-
|
|
3
|
-
[  ](https://www.npmjs.com/package/create-vuepress-theme-hope)
|
|
4
|
-
|
|
5
|
-
Create template shortcut for vuepress-theme-hope.
|
|
6
|
-
|
|
7
|
-
## Usage
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm init vuepress-theme-hope@next <dir>
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
<!-- Or
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
yarn create vuepress-theme-hope <dir>
|
|
17
|
-
``` -->
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
快速创建 vuepress-theme-hope 模板捷径。
|
|
22
|
-
|
|
23
|
-
## 使用
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
npm init vuepress-theme-hope@next <dir>
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
<!-- 或
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
yarn create vuepress-theme-hope <dir>
|
|
33
|
-
``` -->
|
package/rollup.config.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { rollupTypescript } from "../../scripts/rollup";
|
|
2
|
-
|
|
3
|
-
export default rollupTypescript("node/index", {
|
|
4
|
-
external: [
|
|
5
|
-
"@mr-hope/vuepress-shared",
|
|
6
|
-
"cac",
|
|
7
|
-
"execa",
|
|
8
|
-
"fs",
|
|
9
|
-
"https",
|
|
10
|
-
"inquirer",
|
|
11
|
-
"path",
|
|
12
|
-
],
|
|
13
|
-
preserveShebang: true,
|
|
14
|
-
});
|
package/src/node/checkVersion.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { get } from "https";
|
|
2
|
-
|
|
3
|
-
export const checkForNextVersion = (packageName: string): Promise<string> =>
|
|
4
|
-
new Promise((resolve, reject) => {
|
|
5
|
-
get(
|
|
6
|
-
`https://registry.npmjs.org/-/package/${packageName}/dist-tags`,
|
|
7
|
-
(res) => {
|
|
8
|
-
if (res.statusCode === 200) {
|
|
9
|
-
let body = "";
|
|
10
|
-
|
|
11
|
-
res.on("data", (data) => (body += data));
|
|
12
|
-
res.on("end", () => {
|
|
13
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
14
|
-
resolve(JSON.parse(body).next as string);
|
|
15
|
-
});
|
|
16
|
-
} else {
|
|
17
|
-
reject(
|
|
18
|
-
new Error(
|
|
19
|
-
`Get ${packageName} version failed, please check your network!`
|
|
20
|
-
)
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
).on("error", () => {
|
|
25
|
-
reject(
|
|
26
|
-
new Error(
|
|
27
|
-
`Get ${packageName} version failed, please check your network!`
|
|
28
|
-
)
|
|
29
|
-
);
|
|
30
|
-
});
|
|
31
|
-
});
|
package/src/node/copy.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createReadStream,
|
|
3
|
-
createWriteStream,
|
|
4
|
-
mkdirSync,
|
|
5
|
-
readdirSync,
|
|
6
|
-
statSync,
|
|
7
|
-
} from "fs";
|
|
8
|
-
import { dirname } from "path";
|
|
9
|
-
|
|
10
|
-
const ensureDirExistSync = (dirPath: string): void => {
|
|
11
|
-
try {
|
|
12
|
-
readdirSync(dirPath);
|
|
13
|
-
} catch (err) {
|
|
14
|
-
mkdirSync(dirPath);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const copyFile = (srcFile: string, targetFile: string): void => {
|
|
19
|
-
const targetDir = dirname(targetFile);
|
|
20
|
-
|
|
21
|
-
ensureDirExistSync(targetDir);
|
|
22
|
-
|
|
23
|
-
const rs = createReadStream(srcFile); // create read stream
|
|
24
|
-
const ws = createWriteStream(targetFile); // create write stream
|
|
25
|
-
|
|
26
|
-
rs.pipe(ws);
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const copyDir = (srcDir: string, targetDir: string): void => {
|
|
30
|
-
ensureDirExistSync(targetDir);
|
|
31
|
-
|
|
32
|
-
const files = readdirSync(srcDir, { withFileTypes: true });
|
|
33
|
-
|
|
34
|
-
files.forEach((file) => {
|
|
35
|
-
if (file.isFile())
|
|
36
|
-
copyFile(`${srcDir}/${file.name}`, `${targetDir}/${file.name}`);
|
|
37
|
-
else if (file.isDirectory())
|
|
38
|
-
copyDir(`${srcDir}/${file.name}`, `${targetDir}/${file.name}`);
|
|
39
|
-
});
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export const copy = (src: string, target: string): void => {
|
|
43
|
-
if (statSync(src).isDirectory()) copyDir(src, target);
|
|
44
|
-
else if (statSync(src).isFile()) copyFile(src, target);
|
|
45
|
-
};
|
package/src/node/deepAssign.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2
|
-
type IAnyObject = Record<string, any>;
|
|
3
|
-
|
|
4
|
-
/** Deep merge objects to the first one */
|
|
5
|
-
export const deepAssign = <
|
|
6
|
-
T extends IAnyObject,
|
|
7
|
-
U extends IAnyObject = T,
|
|
8
|
-
V extends IAnyObject = T
|
|
9
|
-
>(
|
|
10
|
-
originObject: T,
|
|
11
|
-
...assignObjects: U[]
|
|
12
|
-
): V => {
|
|
13
|
-
if (assignObjects.length === 0) return originObject as V;
|
|
14
|
-
|
|
15
|
-
/** Object being merged */
|
|
16
|
-
const assignObject = (assignObjects.shift() as IAnyObject) || {};
|
|
17
|
-
|
|
18
|
-
Object.keys(assignObject).forEach((property) => {
|
|
19
|
-
if (
|
|
20
|
-
typeof originObject[property] === "object" &&
|
|
21
|
-
!Array.isArray(originObject[property]) &&
|
|
22
|
-
typeof assignObject[property] === "object" &&
|
|
23
|
-
!Array.isArray(assignObject[property])
|
|
24
|
-
)
|
|
25
|
-
deepAssign(originObject[property], assignObject[property]);
|
|
26
|
-
else if (typeof assignObject[property] === "object")
|
|
27
|
-
if (Array.isArray(assignObject[property]))
|
|
28
|
-
(originObject as IAnyObject)[property] = [
|
|
29
|
-
...(assignObject[property] as unknown[]),
|
|
30
|
-
];
|
|
31
|
-
else
|
|
32
|
-
(originObject as IAnyObject)[property] = {
|
|
33
|
-
...(assignObject[property] as Record<string, unknown>),
|
|
34
|
-
};
|
|
35
|
-
else
|
|
36
|
-
(originObject as IAnyObject)[property] = assignObject[
|
|
37
|
-
property
|
|
38
|
-
] as unknown;
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
return deepAssign(originObject, ...assignObjects);
|
|
42
|
-
};
|
package/src/node/hasYarn.ts
DELETED
package/src/node/i18n.ts
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { prompt } from "inquirer";
|
|
2
|
-
|
|
3
|
-
export type Lang = "zh-CN" | "en-US";
|
|
4
|
-
|
|
5
|
-
export interface CreateI18n {
|
|
6
|
-
getVersion: string;
|
|
7
|
-
createPackage: string;
|
|
8
|
-
updatePackage: string;
|
|
9
|
-
template: string;
|
|
10
|
-
install: string;
|
|
11
|
-
wait: string;
|
|
12
|
-
success: string;
|
|
13
|
-
devServerAsk: string;
|
|
14
|
-
devServer: string;
|
|
15
|
-
hint: string;
|
|
16
|
-
nameMessage: string;
|
|
17
|
-
nameError: string;
|
|
18
|
-
versionMessage: string;
|
|
19
|
-
versionError: string;
|
|
20
|
-
descriptionMessage: string;
|
|
21
|
-
licenseMessage: string;
|
|
22
|
-
i18nMessage: string;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export const i18n: Record<Lang, CreateI18n> = {
|
|
26
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
27
|
-
"zh-CN": {
|
|
28
|
-
getVersion: "获取依赖的最新版本...",
|
|
29
|
-
createPackage: "生成 package.json...",
|
|
30
|
-
updatePackage: "更新 package.json...",
|
|
31
|
-
template: "生成模板...",
|
|
32
|
-
wait: "这可能需要数分钟,请耐心等待.\n我们无法正确输出子进程的进度条,所以进程可能会看似未响应",
|
|
33
|
-
install: "安装依赖...",
|
|
34
|
-
success: "模板已成功生成!",
|
|
35
|
-
devServerAsk: "是否想要现在启动 Demo 查看?",
|
|
36
|
-
devServer:
|
|
37
|
-
"启动开发服务器...\n启动成功后,请在浏览器输入给出的开发服务器地址(默认为 'localhost:8080')",
|
|
38
|
-
hint: '提示: 请使用 "yarn run docs:dev" 命令启动开发服务器',
|
|
39
|
-
nameMessage: "设置应用名称",
|
|
40
|
-
nameError: "应用名称应只包含小写字母、数字和连接线 (-)",
|
|
41
|
-
versionMessage: "设置应用版本号",
|
|
42
|
-
versionError: "此版本无效,版本号应为 'x.x.x'",
|
|
43
|
-
descriptionMessage: "设置应用描述",
|
|
44
|
-
licenseMessage: "设置协议",
|
|
45
|
-
i18nMessage: "项目需要用到多语言么?",
|
|
46
|
-
},
|
|
47
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
48
|
-
"en-US": {
|
|
49
|
-
getVersion: "Getting lastest version of deps...",
|
|
50
|
-
createPackage: "Generating package.json...",
|
|
51
|
-
updatePackage: "Updating package.json...",
|
|
52
|
-
template: "Generating Template...",
|
|
53
|
-
wait: "This may take a few minutes, please be patient.\nWe can not correctly output progress bar from child process, so the process may look stuck.",
|
|
54
|
-
install: "Installing Deps...",
|
|
55
|
-
success: "Successful Generated!",
|
|
56
|
-
devServerAsk: "Would you like to preview template now?",
|
|
57
|
-
devServer:
|
|
58
|
-
"Staring dev server...\nAfter the dev server starts running, please visit the given server link ('localhost:8080' by default)",
|
|
59
|
-
hint: 'Hint: You should execute "yarn run docs:dev" to start dev server.',
|
|
60
|
-
nameMessage: "Your project name",
|
|
61
|
-
nameError:
|
|
62
|
-
"package name should only contain lowercase characters, numbers and dash",
|
|
63
|
-
versionMessage: "Your project version",
|
|
64
|
-
versionError:
|
|
65
|
-
"This version is not a valid one. Version should be like 'x.x.x'",
|
|
66
|
-
descriptionMessage: "Your project description",
|
|
67
|
-
licenseMessage: "Your project lincense",
|
|
68
|
-
i18nMessage: "Does the project need mutiple languages?",
|
|
69
|
-
},
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
interface LanguageResult {
|
|
73
|
-
lang: Lang;
|
|
74
|
-
message: CreateI18n;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export const getLanguage = async (): Promise<LanguageResult> => {
|
|
78
|
-
const { language } = await prompt<{ language: Lang }>([
|
|
79
|
-
{
|
|
80
|
-
name: "language",
|
|
81
|
-
type: "list",
|
|
82
|
-
message: "Select a language to display",
|
|
83
|
-
choices: ["en-US", "zh-CN"],
|
|
84
|
-
},
|
|
85
|
-
]);
|
|
86
|
-
|
|
87
|
-
return {
|
|
88
|
-
lang: language,
|
|
89
|
-
message: i18n[language],
|
|
90
|
-
};
|
|
91
|
-
};
|