create-vuepress-theme-hope 2.0.0-alpha.25 → 2.0.0-alpha.29

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.
Files changed (327) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/lib/node/index.js +1 -239
  3. package/lib/node/index.js.map +1 -1
  4. package/package.json +2 -2
  5. package/readme.md +6 -6
  6. package/src/node/checkVersion.ts +1 -1
  7. package/src/node/i18n.ts +3 -0
  8. package/src/node/index.ts +25 -8
  9. package/template/en-US/.vuepress/config.ts +28 -0
  10. package/template/en-US/.vuepress/navbar.ts +52 -0
  11. package/template/{.vuepress → en-US/.vuepress}/public/assets/icon/apple-icon-152.png +0 -0
  12. package/template/{.vuepress → en-US/.vuepress}/public/assets/icon/chrome-192.png +0 -0
  13. package/template/{.vuepress → en-US/.vuepress}/public/assets/icon/chrome-512.png +0 -0
  14. package/template/{.vuepress → en-US/.vuepress}/public/assets/icon/chrome-mask-192.png +0 -0
  15. package/template/{.vuepress → en-US/.vuepress}/public/assets/icon/chrome-mask-512.png +0 -0
  16. package/template/{.vuepress → en-US/.vuepress}/public/assets/icon/guide-maskable.png +0 -0
  17. package/template/{.vuepress → en-US/.vuepress}/public/assets/icon/guide-monochrome.png +0 -0
  18. package/template/{.vuepress → en-US/.vuepress}/public/assets/icon/ms-icon-144.png +0 -0
  19. package/template/{.vuepress → en-US/.vuepress}/public/favicon.ico +0 -0
  20. package/template/{.vuepress → en-US/.vuepress}/public/logo.png +0 -0
  21. package/template/{.vuepress → en-US/.vuepress}/public/logo.svg +0 -0
  22. package/template/en-US/.vuepress/sidebar.ts +47 -0
  23. package/template/{.vuepress → en-US/.vuepress}/styles/index.scss +0 -0
  24. package/template/{.vuepress → en-US/.vuepress}/styles/palette.scss +0 -0
  25. package/template/en-US/.vuepress/themeConfig.ts +149 -0
  26. package/template/{README.md → en-US/README.md} +1 -1
  27. package/template/{guide → en-US/guide}/README.md +0 -0
  28. package/template/{guide → en-US/guide}/disable.md +0 -0
  29. package/template/{guide → en-US/guide}/encrypt.md +0 -0
  30. package/template/{guide → en-US/guide}/markdown.md +10 -10
  31. package/template/{guide → en-US/guide}/page.md +0 -0
  32. package/template/{home.md → en-US/home.md} +13 -13
  33. package/template/{intro.md → en-US/intro.md} +0 -0
  34. package/template/{posts → en-US/posts}/article/article1.md +0 -0
  35. package/template/{posts → en-US/posts}/article/article2.md +0 -0
  36. package/template/{posts → en-US/posts}/article/article3.md +0 -0
  37. package/template/{posts → en-US/posts}/article/article4.md +0 -0
  38. package/template/{posts → en-US/posts}/article/article5.md +0 -0
  39. package/template/{posts → en-US/posts}/article/article6.md +0 -0
  40. package/template/{posts → en-US/posts}/article/article7.md +0 -0
  41. package/template/{posts → en-US/posts}/article/article8.md +0 -0
  42. package/template/{posts → en-US/posts}/article10.md +0 -0
  43. package/template/{posts → en-US/posts}/article11.md +0 -0
  44. package/template/{posts → en-US/posts}/article12.md +0 -0
  45. package/template/{posts → en-US/posts}/article9.md +0 -0
  46. package/template/{slides.md → en-US/slide.md} +0 -0
  47. package/template/i18n/.vuepress/config.ts +33 -0
  48. package/template/i18n/.vuepress/navbar/en.ts +52 -0
  49. package/template/{.vuepress/configs → i18n/.vuepress}/navbar/index.ts +0 -0
  50. package/template/i18n/.vuepress/navbar/zh.ts +52 -0
  51. package/template/i18n/.vuepress/public/assets/icon/apple-icon-152.png +0 -0
  52. package/template/i18n/.vuepress/public/assets/icon/chrome-192.png +0 -0
  53. package/template/i18n/.vuepress/public/assets/icon/chrome-512.png +0 -0
  54. package/template/i18n/.vuepress/public/assets/icon/chrome-mask-192.png +0 -0
  55. package/template/i18n/.vuepress/public/assets/icon/chrome-mask-512.png +0 -0
  56. package/template/i18n/.vuepress/public/assets/icon/guide-maskable.png +0 -0
  57. package/template/i18n/.vuepress/public/assets/icon/guide-monochrome.png +0 -0
  58. package/template/i18n/.vuepress/public/assets/icon/ms-icon-144.png +0 -0
  59. package/template/i18n/.vuepress/public/favicon.ico +0 -0
  60. package/template/i18n/.vuepress/public/logo.png +0 -0
  61. package/template/i18n/.vuepress/public/logo.svg +1 -0
  62. package/template/i18n/.vuepress/sidebar/en.ts +49 -0
  63. package/template/{.vuepress/configs → i18n/.vuepress}/sidebar/index.ts +0 -0
  64. package/template/i18n/.vuepress/sidebar/zh.ts +47 -0
  65. package/template/i18n/.vuepress/styles/index.scss +0 -0
  66. package/template/i18n/.vuepress/styles/palette.scss +0 -0
  67. package/template/i18n/.vuepress/themeConfig.ts +185 -0
  68. package/template/i18n/README.md +38 -0
  69. package/template/i18n/guide/README.md +15 -0
  70. package/template/i18n/guide/disable.md +41 -0
  71. package/template/i18n/guide/encrypt.md +15 -0
  72. package/template/i18n/guide/markdown.md +304 -0
  73. package/template/i18n/guide/page.md +60 -0
  74. package/template/i18n/home.md +85 -0
  75. package/template/i18n/intro.md +7 -0
  76. package/template/i18n/posts/article/article1.md +19 -0
  77. package/template/i18n/posts/article/article2.md +20 -0
  78. package/template/i18n/posts/article/article3.md +20 -0
  79. package/template/i18n/posts/article/article4.md +20 -0
  80. package/template/i18n/posts/article/article5.md +20 -0
  81. package/template/i18n/posts/article/article6.md +21 -0
  82. package/template/i18n/posts/article/article7.md +20 -0
  83. package/template/i18n/posts/article/article8.md +20 -0
  84. package/template/i18n/posts/article10.md +20 -0
  85. package/template/i18n/posts/article11.md +20 -0
  86. package/template/i18n/posts/article12.md +21 -0
  87. package/template/i18n/posts/article9.md +20 -0
  88. package/template/i18n/slide.md +433 -0
  89. package/template/{zh → i18n/zh}/README.md +1 -1
  90. package/template/{zh → i18n/zh}/guide/README.md +0 -0
  91. package/template/{zh → i18n/zh}/guide/disable.md +0 -0
  92. package/template/{zh → i18n/zh}/guide/encrypt.md +0 -0
  93. package/template/{zh → i18n/zh}/guide/markdown.md +0 -0
  94. package/template/{zh → i18n/zh}/guide/page.md +0 -0
  95. package/template/{zh → i18n/zh}/home.md +13 -13
  96. package/template/{zh → i18n/zh}/posts/article/article1.md +0 -0
  97. package/template/{zh → i18n/zh}/posts/article/article2.md +0 -0
  98. package/template/{zh → i18n/zh}/posts/article/article3.md +0 -0
  99. package/template/{zh → i18n/zh}/posts/article/article4.md +0 -0
  100. package/template/{zh → i18n/zh}/posts/article/article5.md +0 -0
  101. package/template/{zh → i18n/zh}/posts/article/article6.md +0 -0
  102. package/template/{zh → i18n/zh}/posts/article/article7.md +0 -0
  103. package/template/{zh → i18n/zh}/posts/article/article8.md +0 -0
  104. package/template/{zh → i18n/zh}/posts/article10.md +0 -0
  105. package/template/{zh → i18n/zh}/posts/article11.md +0 -0
  106. package/template/{zh → i18n/zh}/posts/article12.md +0 -0
  107. package/template/{zh → i18n/zh}/posts/article9.md +0 -0
  108. package/template/{zh/slides.md → i18n/zh/slide.md} +0 -0
  109. package/template/zh-CN/.vuepress/.cache/@mr-hope_vuepress-shared_lib_client.js +1402 -0
  110. package/template/zh-CN/.vuepress/.cache/@mr-hope_vuepress-shared_lib_client.js.map +7 -0
  111. package/template/zh-CN/.vuepress/.cache/@vue_devtools-api.js +41 -0
  112. package/template/zh-CN/.vuepress/.cache/@vue_devtools-api.js.map +7 -0
  113. package/template/zh-CN/.vuepress/.cache/@vuepress_shared.js +622 -0
  114. package/template/zh-CN/.vuepress/.cache/@vuepress_shared.js.map +7 -0
  115. package/template/zh-CN/.vuepress/.cache/@vueuse_core.js +6556 -0
  116. package/template/zh-CN/.vuepress/.cache/@vueuse_core.js.map +7 -0
  117. package/template/zh-CN/.vuepress/.cache/@waline_client.js +3896 -0
  118. package/template/zh-CN/.vuepress/.cache/@waline_client.js.map +7 -0
  119. package/template/zh-CN/.vuepress/.cache/_metadata.json +161 -0
  120. package/template/zh-CN/.vuepress/.cache/bcryptjs.js +1909 -0
  121. package/template/zh-CN/.vuepress/.cache/bcryptjs.js.map +7 -0
  122. package/template/zh-CN/.vuepress/.cache/body-scroll-lock.js +214 -0
  123. package/template/zh-CN/.vuepress/.cache/body-scroll-lock.js.map +7 -0
  124. package/template/zh-CN/.vuepress/.cache/chunk-2JB763FX.js +187 -0
  125. package/template/zh-CN/.vuepress/.cache/chunk-2JB763FX.js.map +7 -0
  126. package/template/zh-CN/.vuepress/.cache/chunk-3EXDT3YR.js +123 -0
  127. package/template/zh-CN/.vuepress/.cache/chunk-3EXDT3YR.js.map +7 -0
  128. package/template/zh-CN/.vuepress/.cache/chunk-G642NIRV.js +8451 -0
  129. package/template/zh-CN/.vuepress/.cache/chunk-G642NIRV.js.map +7 -0
  130. package/template/zh-CN/.vuepress/.cache/chunk-GG2GV5SX.js +65 -0
  131. package/template/zh-CN/.vuepress/.cache/chunk-GG2GV5SX.js.map +7 -0
  132. package/template/zh-CN/.vuepress/.cache/chunk-HY7UP3Y7.js +331 -0
  133. package/template/zh-CN/.vuepress/.cache/chunk-HY7UP3Y7.js.map +7 -0
  134. package/template/zh-CN/.vuepress/.cache/chunk-KX764DYK.js +351 -0
  135. package/template/zh-CN/.vuepress/.cache/chunk-KX764DYK.js.map +7 -0
  136. package/template/zh-CN/.vuepress/.cache/chunk-RHUTP25B.js +243 -0
  137. package/template/zh-CN/.vuepress/.cache/chunk-RHUTP25B.js.map +7 -0
  138. package/template/zh-CN/.vuepress/.cache/chunk-SPNUHUU2.js +105 -0
  139. package/template/zh-CN/.vuepress/.cache/chunk-SPNUHUU2.js.map +7 -0
  140. package/template/zh-CN/.vuepress/.cache/chunk-UJLLDWRU.js +87 -0
  141. package/template/zh-CN/.vuepress/.cache/chunk-UJLLDWRU.js.map +7 -0
  142. package/template/zh-CN/.vuepress/.cache/dayjs.js +42 -0
  143. package/template/zh-CN/.vuepress/.cache/dayjs.js.map +7 -0
  144. package/template/zh-CN/.vuepress/.cache/dayjs_plugin_localizedFormat.js +42 -0
  145. package/template/zh-CN/.vuepress/.cache/dayjs_plugin_localizedFormat.js.map +7 -0
  146. package/template/zh-CN/.vuepress/.cache/dayjs_plugin_objectSupport.js +42 -0
  147. package/template/zh-CN/.vuepress/.cache/dayjs_plugin_objectSupport.js.map +7 -0
  148. package/template/zh-CN/.vuepress/.cache/dayjs_plugin_timezone.js +42 -0
  149. package/template/zh-CN/.vuepress/.cache/dayjs_plugin_timezone.js.map +7 -0
  150. package/template/zh-CN/.vuepress/.cache/dayjs_plugin_utc.js +42 -0
  151. package/template/zh-CN/.vuepress/.cache/dayjs_plugin_utc.js.map +7 -0
  152. package/template/zh-CN/.vuepress/.cache/flowchart_js.js +4617 -0
  153. package/template/zh-CN/.vuepress/.cache/flowchart_js.js.map +7 -0
  154. package/template/zh-CN/.vuepress/.cache/lodash_debounce.js +188 -0
  155. package/template/zh-CN/.vuepress/.cache/lodash_debounce.js.map +7 -0
  156. package/template/zh-CN/.vuepress/.cache/lodash_throttle.js +203 -0
  157. package/template/zh-CN/.vuepress/.cache/lodash_throttle.js.map +7 -0
  158. package/template/zh-CN/.vuepress/.cache/mermaid.js +29764 -0
  159. package/template/zh-CN/.vuepress/.cache/mermaid.js.map +7 -0
  160. package/template/zh-CN/.vuepress/.cache/mitt.js +74 -0
  161. package/template/zh-CN/.vuepress/.cache/mitt.js.map +7 -0
  162. package/template/zh-CN/.vuepress/.cache/nprogress.js +334 -0
  163. package/template/zh-CN/.vuepress/.cache/nprogress.js.map +7 -0
  164. package/template/zh-CN/.vuepress/.cache/package.json +1 -0
  165. package/template/zh-CN/.vuepress/.cache/photoswipe.js +2411 -0
  166. package/template/zh-CN/.vuepress/.cache/photoswipe.js.map +7 -0
  167. package/template/zh-CN/.vuepress/.cache/photoswipe_dist_photoswipe-ui-default.js +659 -0
  168. package/template/zh-CN/.vuepress/.cache/photoswipe_dist_photoswipe-ui-default.js.map +7 -0
  169. package/template/zh-CN/.vuepress/.cache/register-service-worker.js +160 -0
  170. package/template/zh-CN/.vuepress/.cache/register-service-worker.js.map +7 -0
  171. package/template/zh-CN/.vuepress/.cache/reveal_js.js +1844 -0
  172. package/template/zh-CN/.vuepress/.cache/reveal_js.js.map +7 -0
  173. package/template/zh-CN/.vuepress/.cache/reveal_js_plugin_highlight_highlight_esm_js.js +4549 -0
  174. package/template/zh-CN/.vuepress/.cache/reveal_js_plugin_highlight_highlight_esm_js.js.map +7 -0
  175. package/template/zh-CN/.vuepress/.cache/reveal_js_plugin_markdown_markdown_esm_js.js +2897 -0
  176. package/template/zh-CN/.vuepress/.cache/reveal_js_plugin_markdown_markdown_esm_js.js.map +7 -0
  177. package/template/zh-CN/.vuepress/.cache/reveal_js_plugin_math_math_esm_js.js +1545 -0
  178. package/template/zh-CN/.vuepress/.cache/reveal_js_plugin_math_math_esm_js.js.map +7 -0
  179. package/template/zh-CN/.vuepress/.cache/reveal_js_plugin_notes_notes_esm_js.js +2996 -0
  180. package/template/zh-CN/.vuepress/.cache/reveal_js_plugin_notes_notes_esm_js.js.map +7 -0
  181. package/template/zh-CN/.vuepress/.cache/reveal_js_plugin_search_search_esm_js.js +811 -0
  182. package/template/zh-CN/.vuepress/.cache/reveal_js_plugin_search_search_esm_js.js.map +7 -0
  183. package/template/zh-CN/.vuepress/.cache/reveal_js_plugin_zoom_zoom_esm_js.js +118 -0
  184. package/template/zh-CN/.vuepress/.cache/reveal_js_plugin_zoom_zoom_esm_js.js.map +7 -0
  185. package/template/zh-CN/.vuepress/.cache/screenfull.js +220 -0
  186. package/template/zh-CN/.vuepress/.cache/screenfull.js.map +7 -0
  187. package/template/zh-CN/.vuepress/.cache/vue-router.js +2415 -0
  188. package/template/zh-CN/.vuepress/.cache/vue-router.js.map +7 -0
  189. package/template/zh-CN/.vuepress/.cache/vue.js +329 -0
  190. package/template/zh-CN/.vuepress/.cache/vue.js.map +7 -0
  191. package/template/zh-CN/.vuepress/.temp/blog/category.js +14 -0
  192. package/template/zh-CN/.vuepress/.temp/blog/type.js +14 -0
  193. package/template/zh-CN/.vuepress/.temp/internal/clientAppEnhances.js +19 -0
  194. package/template/zh-CN/.vuepress/.temp/internal/clientAppRootComponents.js +11 -0
  195. package/template/zh-CN/.vuepress/.temp/internal/clientAppSetups.js +19 -0
  196. package/template/zh-CN/.vuepress/.temp/internal/layoutComponents.js +8 -0
  197. package/template/zh-CN/.vuepress/.temp/internal/pagesComponents.js +80 -0
  198. package/template/zh-CN/.vuepress/.temp/internal/pagesData.js +78 -0
  199. package/template/zh-CN/.vuepress/.temp/internal/pagesRoutes.js +67 -0
  200. package/template/zh-CN/.vuepress/.temp/internal/siteData.js +135 -0
  201. package/template/zh-CN/.vuepress/.temp/internal/themeData.js +280 -0
  202. package/template/zh-CN/.vuepress/.temp/pages/404.html.js +60 -0
  203. package/template/zh-CN/.vuepress/.temp/pages/404.html.vue +1 -0
  204. package/template/zh-CN/.vuepress/.temp/pages/article/index.html.js +64 -0
  205. package/template/zh-CN/.vuepress/.temp/pages/article/index.html.vue +1 -0
  206. package/template/zh-CN/.vuepress/.temp/pages/category/categorya/index.html.js +65 -0
  207. package/template/zh-CN/.vuepress/.temp/pages/category/categorya/index.html.vue +1 -0
  208. package/template/zh-CN/.vuepress/.temp/pages/category/categoryb/index.html.js +65 -0
  209. package/template/zh-CN/.vuepress/.temp/pages/category/categoryb/index.html.vue +1 -0
  210. package/template/zh-CN/.vuepress/.temp/pages/category/index.html.js +64 -0
  211. package/template/zh-CN/.vuepress/.temp/pages/category/index.html.vue +1 -0
  212. package/template/zh-CN/.vuepress/.temp/pages/category//344/275/277/347/224/250/346/214/207/345/215/227/index.html.js +65 -0
  213. package/template/zh-CN/.vuepress/.temp/pages/category//344/275/277/347/224/250/346/214/207/345/215/227/index.html.vue +1 -0
  214. package/template/zh-CN/.vuepress/.temp/pages/encrypted/index.html.js +64 -0
  215. package/template/zh-CN/.vuepress/.temp/pages/encrypted/index.html.vue +1 -0
  216. package/template/zh-CN/.vuepress/.temp/pages/guide/disable.html.js +93 -0
  217. package/template/zh-CN/.vuepress/.temp/pages/guide/disable.html.vue +17 -0
  218. package/template/zh-CN/.vuepress/.temp/pages/guide/encrypt.html.js +80 -0
  219. package/template/zh-CN/.vuepress/.temp/pages/guide/encrypt.html.vue +5 -0
  220. package/template/zh-CN/.vuepress/.temp/pages/guide/index.html.js +70 -0
  221. package/template/zh-CN/.vuepress/.temp/pages/guide/index.html.vue +16 -0
  222. package/template/zh-CN/.vuepress/.temp/pages/guide/markdown.html.js +180 -0
  223. package/template/zh-CN/.vuepress/.temp/pages/guide/markdown.html.vue +180 -0
  224. package/template/zh-CN/.vuepress/.temp/pages/guide/page.html.js +127 -0
  225. package/template/zh-CN/.vuepress/.temp/pages/guide/page.html.vue +41 -0
  226. package/template/zh-CN/.vuepress/.temp/pages/home.html.js +159 -0
  227. package/template/zh-CN/.vuepress/.temp/pages/home.html.vue +4 -0
  228. package/template/zh-CN/.vuepress/.temp/pages/index.html.js +101 -0
  229. package/template/zh-CN/.vuepress/.temp/pages/index.html.vue +4 -0
  230. package/template/zh-CN/.vuepress/.temp/pages/posts/article/article1.html.js +110 -0
  231. package/template/zh-CN/.vuepress/.temp/pages/posts/article/article1.html.vue +6 -0
  232. package/template/zh-CN/.vuepress/.temp/pages/posts/article/article2.html.js +111 -0
  233. package/template/zh-CN/.vuepress/.temp/pages/posts/article/article2.html.vue +6 -0
  234. package/template/zh-CN/.vuepress/.temp/pages/posts/article/article3.html.js +111 -0
  235. package/template/zh-CN/.vuepress/.temp/pages/posts/article/article3.html.vue +6 -0
  236. package/template/zh-CN/.vuepress/.temp/pages/posts/article/article4.html.js +111 -0
  237. package/template/zh-CN/.vuepress/.temp/pages/posts/article/article4.html.vue +6 -0
  238. package/template/zh-CN/.vuepress/.temp/pages/posts/article/article5.html.js +111 -0
  239. package/template/zh-CN/.vuepress/.temp/pages/posts/article/article5.html.vue +6 -0
  240. package/template/zh-CN/.vuepress/.temp/pages/posts/article/article6.html.js +112 -0
  241. package/template/zh-CN/.vuepress/.temp/pages/posts/article/article6.html.vue +6 -0
  242. package/template/zh-CN/.vuepress/.temp/pages/posts/article/article7.html.js +111 -0
  243. package/template/zh-CN/.vuepress/.temp/pages/posts/article/article7.html.vue +6 -0
  244. package/template/zh-CN/.vuepress/.temp/pages/posts/article/article8.html.js +111 -0
  245. package/template/zh-CN/.vuepress/.temp/pages/posts/article/article8.html.vue +6 -0
  246. package/template/zh-CN/.vuepress/.temp/pages/posts/article10.html.js +111 -0
  247. package/template/zh-CN/.vuepress/.temp/pages/posts/article10.html.vue +6 -0
  248. package/template/zh-CN/.vuepress/.temp/pages/posts/article11.html.js +111 -0
  249. package/template/zh-CN/.vuepress/.temp/pages/posts/article11.html.vue +6 -0
  250. package/template/zh-CN/.vuepress/.temp/pages/posts/article12.html.js +112 -0
  251. package/template/zh-CN/.vuepress/.temp/pages/posts/article12.html.vue +6 -0
  252. package/template/zh-CN/.vuepress/.temp/pages/posts/article9.html.js +111 -0
  253. package/template/zh-CN/.vuepress/.temp/pages/posts/article9.html.vue +6 -0
  254. package/template/zh-CN/.vuepress/.temp/pages/slide.html.js +69 -0
  255. package/template/zh-CN/.vuepress/.temp/pages/slide.html.vue +2 -0
  256. package/template/zh-CN/.vuepress/.temp/pages/slides/index.html.js +64 -0
  257. package/template/zh-CN/.vuepress/.temp/pages/slides/index.html.vue +1 -0
  258. package/template/zh-CN/.vuepress/.temp/pages/star/index.html.js +64 -0
  259. package/template/zh-CN/.vuepress/.temp/pages/star/index.html.vue +1 -0
  260. package/template/zh-CN/.vuepress/.temp/pages/tag/index.html.js +64 -0
  261. package/template/zh-CN/.vuepress/.temp/pages/tag/index.html.vue +1 -0
  262. package/template/zh-CN/.vuepress/.temp/pages/tag/markdown/index.html.js +65 -0
  263. package/template/zh-CN/.vuepress/.temp/pages/tag/markdown/index.html.vue +1 -0
  264. package/template/zh-CN/.vuepress/.temp/pages/tag/tag-a/index.html.js +65 -0
  265. package/template/zh-CN/.vuepress/.temp/pages/tag/tag-a/index.html.vue +1 -0
  266. package/template/zh-CN/.vuepress/.temp/pages/tag/tag-b/index.html.js +65 -0
  267. package/template/zh-CN/.vuepress/.temp/pages/tag/tag-b/index.html.vue +1 -0
  268. package/template/zh-CN/.vuepress/.temp/pages/tag//344/275/277/347/224/250/346/214/207/345/215/227/index.html.js +65 -0
  269. package/template/zh-CN/.vuepress/.temp/pages/tag//344/275/277/347/224/250/346/214/207/345/215/227/index.html.vue +1 -0
  270. package/template/zh-CN/.vuepress/.temp/pages/tag//346/226/207/347/253/240/345/212/240/345/257/206/index.html.js +65 -0
  271. package/template/zh-CN/.vuepress/.temp/pages/tag//346/226/207/347/253/240/345/212/240/345/257/206/index.html.vue +1 -0
  272. package/template/zh-CN/.vuepress/.temp/pages/tag//347/246/201/347/224/250/index.html.js +65 -0
  273. package/template/zh-CN/.vuepress/.temp/pages/tag//347/246/201/347/224/250/index.html.vue +1 -0
  274. package/template/zh-CN/.vuepress/.temp/pages/tag//351/241/265/351/235/242/351/205/215/347/275/256/index.html.js +65 -0
  275. package/template/zh-CN/.vuepress/.temp/pages/tag//351/241/265/351/235/242/351/205/215/347/275/256/index.html.vue +1 -0
  276. package/template/zh-CN/.vuepress/.temp/pages/timeline/index.html.js +64 -0
  277. package/template/zh-CN/.vuepress/.temp/pages/timeline/index.html.vue +1 -0
  278. package/template/zh-CN/.vuepress/.temp/sass-palette/hope-config.scss +6 -0
  279. package/template/zh-CN/.vuepress/.temp/sass-palette/hope-inject.scss +29 -0
  280. package/template/zh-CN/.vuepress/.temp/sass-palette/hope-palette.scss +4 -0
  281. package/template/zh-CN/.vuepress/.temp/sass-palette/hope-style.scss +1 -0
  282. package/template/zh-CN/.vuepress/.temp/sass-palette/load-hope.js +1 -0
  283. package/template/zh-CN/.vuepress/.temp/theme-hope/theme-color.scss +1 -0
  284. package/template/zh-CN/.vuepress/.temp/vite-root/index.html +13 -0
  285. package/template/zh-CN/.vuepress/config.ts +28 -0
  286. package/template/zh-CN/.vuepress/navbar.ts +52 -0
  287. package/template/zh-CN/.vuepress/public/assets/icon/apple-icon-152.png +0 -0
  288. package/template/zh-CN/.vuepress/public/assets/icon/chrome-192.png +0 -0
  289. package/template/zh-CN/.vuepress/public/assets/icon/chrome-512.png +0 -0
  290. package/template/zh-CN/.vuepress/public/assets/icon/chrome-mask-192.png +0 -0
  291. package/template/zh-CN/.vuepress/public/assets/icon/chrome-mask-512.png +0 -0
  292. package/template/zh-CN/.vuepress/public/assets/icon/guide-maskable.png +0 -0
  293. package/template/zh-CN/.vuepress/public/assets/icon/guide-monochrome.png +0 -0
  294. package/template/zh-CN/.vuepress/public/assets/icon/ms-icon-144.png +0 -0
  295. package/template/zh-CN/.vuepress/public/favicon.ico +0 -0
  296. package/template/zh-CN/.vuepress/public/logo.png +0 -0
  297. package/template/zh-CN/.vuepress/public/logo.svg +1 -0
  298. package/template/zh-CN/.vuepress/sidebar.ts +45 -0
  299. package/template/zh-CN/.vuepress/styles/index.scss +0 -0
  300. package/template/zh-CN/.vuepress/styles/palette.scss +0 -0
  301. package/template/zh-CN/.vuepress/themeConfig.ts +154 -0
  302. package/template/zh-CN/README.md +38 -0
  303. package/template/zh-CN/guide/README.md +15 -0
  304. package/template/zh-CN/guide/disable.md +41 -0
  305. package/template/zh-CN/guide/encrypt.md +15 -0
  306. package/template/zh-CN/guide/markdown.md +302 -0
  307. package/template/zh-CN/guide/page.md +60 -0
  308. package/template/zh-CN/home.md +85 -0
  309. package/template/zh-CN/posts/article/article1.md +19 -0
  310. package/template/zh-CN/posts/article/article2.md +20 -0
  311. package/template/zh-CN/posts/article/article3.md +20 -0
  312. package/template/zh-CN/posts/article/article4.md +20 -0
  313. package/template/zh-CN/posts/article/article5.md +20 -0
  314. package/template/zh-CN/posts/article/article6.md +21 -0
  315. package/template/zh-CN/posts/article/article7.md +20 -0
  316. package/template/zh-CN/posts/article/article8.md +20 -0
  317. package/template/zh-CN/posts/article10.md +20 -0
  318. package/template/zh-CN/posts/article11.md +20 -0
  319. package/template/zh-CN/posts/article12.md +21 -0
  320. package/template/zh-CN/posts/article9.md +20 -0
  321. package/template/zh-CN/slide.md +429 -0
  322. package/template/.vuepress/config.ts +0 -212
  323. package/template/.vuepress/configs/index.ts +0 -2
  324. package/template/.vuepress/configs/navbar/en.ts +0 -52
  325. package/template/.vuepress/configs/navbar/zh.ts +0 -52
  326. package/template/.vuepress/configs/sidebar/en.ts +0 -64
  327. package/template/.vuepress/configs/sidebar/zh.ts +0 -67
package/CHANGELOG.md CHANGED
@@ -3,6 +3,32 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [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)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **create:** fix locale language ([23bcf44](https://github.com/vuepress-theme-hope/vuepress-theme-hope/commit/23bcf44fadd6b63c4c4696a8b6a61d11efae0d6a))
11
+
12
+ # [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)
13
+
14
+ ### Bug Fixes
15
+
16
+ - **create:** fix command ([ee2c91d](https://github.com/vuepress-theme-hope/vuepress-theme-hope/commit/ee2c91d9b8eeb6af627457db889dccacb03835d8))
17
+
18
+ ### Features
19
+
20
+ - **create:** add i18n support ([4605db5](https://github.com/vuepress-theme-hope/vuepress-theme-hope/commit/4605db5261b442281ce1f80c7cdc3af122b22c90))
21
+
22
+ # [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)
23
+
24
+ ### Bug Fixes
25
+
26
+ - **create:** fix template folder path ([3fcc980](https://github.com/vuepress-theme-hope/vuepress-theme-hope/commit/3fcc980865c14a74c54bc7950e93cadab3da2d00))
27
+
28
+ # [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)
29
+
30
+ **Note:** Version bump only for package create-vuepress-theme-hope
31
+
6
32
  # [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)
7
33
 
8
34
  ### Bug Fixes
package/lib/node/index.js CHANGED
@@ -1,241 +1,3 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
3
-
4
- var fs = require('fs');
5
- var path = require('path');
6
- var vuepressShared = require('@mr-hope/vuepress-shared');
7
- var cac = require('cac');
8
- var inquirer = require('inquirer');
9
- var execa = require('execa');
10
- var utils = require('@vuepress/utils');
11
- var https = require('https');
12
-
13
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
14
-
15
- var execa__default = /*#__PURE__*/_interopDefaultLegacy(execa);
16
-
17
- const copyFile = (srcFile, targetFile) => {
18
- const targetDir = utils.path.dirname(targetFile);
19
- utils.fs.ensureDirSync(targetDir);
20
- const rs = utils.fs.createReadStream(srcFile); // create read stream
21
- const ws = utils.fs.createWriteStream(targetFile); // create write stream
22
- rs.pipe(ws);
23
- };
24
- const copyDir = (srcDir, targetDir) => {
25
- utils.fs.ensureDirSync(targetDir);
26
- const files = utils.fs.readdirSync(srcDir, { withFileTypes: true });
27
- files.forEach((file) => {
28
- if (file.isFile())
29
- copyFile(`${srcDir}/${file.name}`, `${targetDir}/${file.name}`);
30
- else if (file.isDirectory())
31
- copyDir(`${srcDir}/${file.name}`, `${targetDir}/${file.name}`);
32
- });
33
- };
34
- const copy = (src, target) => {
35
- if (utils.fs.statSync(src).isDirectory())
36
- copyDir(src, target);
37
- else if (utils.fs.statSync(src).isFile())
38
- copyFile(src, target);
39
- };
40
-
41
- const checkForLatestVersion = (packageName) => new Promise((resolve, reject) => {
42
- https.get(`https://registry.npmjs.org/-/package/${packageName}/dist-tags`, (res) => {
43
- if (res.statusCode === 200) {
44
- let body = "";
45
- res.on("data", (data) => (body += data));
46
- res.on("end", () => {
47
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
48
- resolve(JSON.parse(body).next);
49
- });
50
- }
51
- else {
52
- reject(new Error(`Get ${packageName} version failed, please check your network!`));
53
- }
54
- }).on("error", () => {
55
- reject(new Error(`Get ${packageName} version failed, please check your network!`));
56
- });
57
- });
58
-
59
- const detectYarn = () => {
60
- try {
61
- execa.sync("yarn --version", { stdio: "ignore" });
62
- return true;
63
- }
64
- catch (e) {
65
- return false;
66
- }
67
- };
68
-
69
- const i18n = {
70
- "zh-CN": {
71
- getVersion: "获取依赖的最新版本...",
72
- createPackage: "生成 package.json...",
73
- updatePackage: "更新 package.json...",
74
- template: "生成模板...",
75
- wait: "这可能需要数分钟,请耐心等待.\n我们无法正确输出子进程的进度条,所以进程可能会看似未响应",
76
- install: "安装依赖...",
77
- success: "模板已成功生成!",
78
- devServerAsk: "是否想要现在启动 Demo 查看?",
79
- devServer: "启动开发服务器...\n启动成功后,请在浏览器输入给出的开发服务器地址(默认为 'localhost:8080')",
80
- hint: '提示: 请使用 "yarn run docs:dev" 命令启动开发服务器',
81
- nameMessage: "设置应用名称",
82
- nameError: "应用名称应只包含小写字母、数字和连接线 (-)",
83
- versionMessage: "设置应用版本号",
84
- versionError: "此版本无效,版本号应为 'x.x.x'",
85
- descriptionMessage: "设置应用描述",
86
- licenseMessage: "设置协议",
87
- },
88
- "en-US": {
89
- getVersion: "Getting lastest version of deps...",
90
- createPackage: "Generating package.json...",
91
- updatePackage: "Updating package.json...",
92
- template: "Generating Template...",
93
- 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.",
94
- install: "Installing Deps...",
95
- success: "Successful Generated!",
96
- devServerAsk: "Would you like to preview template now?",
97
- devServer: "Staring dev server...\nAfter the dev server starts running, please visit the given server link ('localhost:8080' by default)",
98
- hint: 'Hint: You should execute "yarn run docs:dev" to start dev server.',
99
- nameMessage: "Your project name",
100
- nameError: "package name should only contain lowercase characters, numbers and dash",
101
- versionMessage: "Your project version",
102
- versionError: "This version is not a valid one. Version should be like 'x.x.x'",
103
- descriptionMessage: "Your project description",
104
- licenseMessage: "Your project lincense",
105
- },
106
- };
107
- const getLanguage = async () => {
108
- const { language } = await inquirer.prompt([
109
- {
110
- name: "language",
111
- type: "list",
112
- message: "Select a language to display",
113
- choices: ["en-US", "zh-CN"],
114
- },
115
- ]);
116
- return {
117
- lang: language,
118
- message: i18n[language],
119
- };
120
- };
121
-
122
- const npmmirrorRegistry = "https://registry.npmmirror.com/";
123
- const getUserRegistry = (bin) => execa.sync(bin ? "yarn" : "npm", ["config", "get", "registry"]).stdout;
124
- const getRegistry = async (lang, bin) => {
125
- const userRegistry = getUserRegistry(bin);
126
- if (lang === "en-US" || userRegistry === npmmirrorRegistry)
127
- return userRegistry;
128
- const { registry } = await inquirer.prompt([
129
- {
130
- name: "registry",
131
- type: "list",
132
- message: "选择你想使用的源",
133
- choices: ["国内镜像源", "当前源"],
134
- },
135
- ]);
136
- return registry === "国内镜像源" ? npmmirrorRegistry : userRegistry;
137
- };
138
-
139
- const cli = cac.cac("vuepress-theme-hope");
140
- const bin = detectYarn() ? "yarn" : "npm";
141
- cli
142
- .command("[dir]", "Generate a new vuepress-theme-hope project")
143
- .action(async (dir) => {
144
- if (!dir)
145
- return cli.outputHelp();
146
- const { lang, message } = await getLanguage();
147
- const targetFolder = path.resolve(process.cwd(), dir);
148
- const packageJsonPath = path.resolve(process.cwd(), "package.json");
149
- const scripts = {
150
- "docs:build": `vuepress build ${dir}`,
151
- "docs:clean-dev": `vuepress dev ${dir} --no-cache`,
152
- "docs:dev": `vuepress dev ${dir}`,
153
- "docs:eject-theme": `vuepress eject-hope ${dir}`,
154
- };
155
- console.log(message.getVersion);
156
- const vuepressVersion = await checkForLatestVersion("vuepress");
157
- const themeVersion = await checkForLatestVersion("vuepress-theme-hope");
158
- const devDependencies = {
159
- vuepress: `^${vuepressVersion}`,
160
- "vuepress-theme-hope": `^${themeVersion}`,
161
- };
162
- if (!fs.existsSync(targetFolder))
163
- fs.mkdirSync(targetFolder);
164
- if (fs.existsSync(packageJsonPath)) {
165
- console.log(message.updatePackage);
166
- // eslint-disable-next-line
167
- const packageContent = JSON.parse(fs.readFileSync(packageJsonPath, { encoding: "utf-8" }));
168
- vuepressShared.deepAssign(packageContent, { scripts, devDependencies });
169
- fs.writeFileSync(packageJsonPath, `${JSON.stringify(packageContent, null, 2)}\n`, { encoding: "utf-8" });
170
- }
171
- else {
172
- console.log(message.createPackage);
173
- const result = await inquirer.prompt([
174
- {
175
- name: "name",
176
- type: "input",
177
- message: message.nameMessage,
178
- default: "vuepress-theme-hope-project",
179
- validate: (input) => /^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/u.exec(input)
180
- ? true
181
- : message.nameError,
182
- },
183
- {
184
- name: "version",
185
- type: "input",
186
- message: message.versionMessage,
187
- default: "1.0.0",
188
- validate: (input) => /^[0-9]+\.[0-9]+\.(?:[0=9]+|[0-9]+-[a-z]+\.[0-9])$/u.exec(input)
189
- ? true
190
- : message.versionError,
191
- },
192
- {
193
- name: "description",
194
- type: "input",
195
- message: message.descriptionMessage,
196
- default: "A project of vuepress-theme-hope",
197
- },
198
- {
199
- name: "license",
200
- type: "input",
201
- message: message.licenseMessage,
202
- default: "MIT",
203
- },
204
- ]);
205
- const packageContent = { ...result, scripts, devDependencies };
206
- fs.writeFileSync(packageJsonPath, `${JSON.stringify(packageContent, null, 2)}\n`, { encoding: "utf-8" });
207
- }
208
- console.log(message.template);
209
- copy(path.resolve(__dirname, "../template"), path.resolve(process.cwd(), dir));
210
- console.log(message.install);
211
- console.warn(message.wait);
212
- const registry = await getRegistry(lang, bin);
213
- execa__default["default"].sync(bin, ["install", "--registry", registry], {
214
- stdout: "inherit",
215
- });
216
- console.log(message.success);
217
- const { choise } = await inquirer.prompt([
218
- {
219
- name: "choise",
220
- type: "list",
221
- message: message.devServerAsk,
222
- choices: ["Yes", "No"],
223
- },
224
- ]);
225
- if (choise === "Yes") {
226
- console.log(message.devServer);
227
- await execa__default["default"](bin, ["run", "docs:dev"], {
228
- stdout: "inherit",
229
- });
230
- }
231
- else
232
- console.log(message.hint);
233
- });
234
- cli.help(() => [
235
- {
236
- title: "yarn create vuepress-theme-hope <dir> / npm init vuepress-theme-hope <dir>",
237
- body: "Create a vuepress-theme-hope template in <dir>",
238
- },
239
- ]);
240
- cli.parse();
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();
241
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/node/copy.ts","../../src/node/checkVersion.ts","../../src/node/hasYarn.ts","../../src/node/i18n.ts","../../src/node/registry.ts","../../src/node/index.ts"],"sourcesContent":[null,null,null,null,null,null],"names":["path","fs","get","sync","prompt","cac","resolve","existsSync","mkdirSync","readFileSync","deepAssign","writeFileSync","execa"],"mappings":";;;;;;;;;;;;;;;;AAEA,MAAM,QAAQ,GAAG,CAAC,OAAe,EAAE,UAAkB;IACnD,MAAM,SAAS,GAAGA,UAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAE3CC,QAAE,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IAE5B,MAAM,EAAE,GAAGA,QAAE,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACxC,MAAM,EAAE,GAAGA,QAAE,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;IAE5C,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,OAAO,GAAG,CAAC,MAAc,EAAE,SAAiB;IAChDA,QAAE,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IAE5B,MAAM,KAAK,GAAGA,QAAE,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;IAE9D,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI;QACjB,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,QAAQ,CAAC,GAAG,MAAM,IAAI,IAAI,CAAC,IAAI,EAAE,EAAE,GAAG,SAAS,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;aAC7D,IAAI,IAAI,CAAC,WAAW,EAAE;YACzB,OAAO,CAAC,GAAG,MAAM,IAAI,IAAI,CAAC,IAAI,EAAE,EAAE,GAAG,SAAS,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;KAClE,CAAC,CAAC;AACL,CAAC,CAAC;AAEK,MAAM,IAAI,GAAG,CAAC,GAAW,EAAE,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,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,SAAS,EAAE,YAAY,EAAE,QAAQ,CAAC,EAAE;QACnD,MAAM,EAAE,SAAS;KAClB,CAAC,CAAC;IAEH,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAE7B,MAAM,EAAE,MAAM,EAAE,GAAG,MAAMR,eAAM,CAA2B;QACxD;YACE,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,OAAO,CAAC,YAAY;YAC7B,OAAO,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC;SACvB;KACF,CAAC,CAAC;IAEH,IAAI,MAAM,KAAK,KAAK,EAAE;QACpB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAE/B,MAAMQ,yBAAK,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,EAAE;YACpC,MAAM,EAAE,SAAS;SAClB,CAAC,CAAC;KACJ;;QAAM,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AACnC,CAAC,CAAC,CAAC;AAEL,GAAG,CAAC,IAAI,CAAC,MAAM;IACb;QACE,KAAK,EACH,4EAA4E;QAC9E,IAAI,EAAE,gDAAgD;KACvD;CACF,CAAC,CAAC;AAEH,GAAG,CAAC,KAAK,EAAE"}
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,OAvBAC,OAAOC,KAAKH,GAAcI,SAASC,IAEG,iBAA3BR,EAAaQ,IACnBC,MAAMC,QAAQV,EAAaQ,KACM,iBAA3BL,EAAaK,IACnBC,MAAMC,QAAQP,EAAaK,IAGa,iBAA3BL,EAAaK,GACvBC,MAAMC,QAAQP,EAAaK,IAC5BR,EAA4BQ,GAAY,IACnCL,EAAaK,IAGlBR,EAA4BQ,GAAY,IACnCL,EAAaK,IAGpBR,EAA4BQ,GAAYL,EACvCK,GAZFT,EAAWC,EAAaQ,GAAWL,EAAaK,OAgB7CT,EAAWC,KAAiBC,IC/B/BU,EAAsBC,IAC1B,IACEC,cAAYD,GACZ,MAAOE,GACPC,YAAUH,KAIRI,EAAW,CAACC,EAAiBC,KACjC,MAAMC,EAAYC,UAAQF,GAE1BP,EAAmBQ,GAEnB,MAAME,EAAKC,mBAAiBL,GACtBM,EAAKC,oBAAkBN,GAE7BG,EAAGI,KAAKF,IAGJG,EAAU,CAACC,EAAgBR,KAC/BR,EAAmBQ,GAELN,cAAYc,EAAQ,CAAEC,eAAe,IAE7CrB,SAASsB,IACTA,EAAKC,SACPd,EAAS,GAAGW,KAAUE,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,IAAM,CACb,CACEC,MACE,6EACF7E,KAAM,qDAIVwC,EAAIpC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-vuepress-theme-hope",
3
- "version": "2.0.0-alpha.25",
3
+ "version": "2.0.0-alpha.29",
4
4
  "description": "Create vuepress-theme-hope demo project helper",
5
5
  "keywords": [
6
6
  "create",
@@ -37,5 +37,5 @@
37
37
  "execa": "^5.1.1",
38
38
  "inquirer": "^8.2.0"
39
39
  },
40
- "gitHead": "e45e15e98fd916c84d0e0efc3edeadbc060ef27d"
40
+ "gitHead": "bf211ea2d600320632bef69091d4fc3672902c5b"
41
41
  }
package/readme.md CHANGED
@@ -7,14 +7,14 @@ Create template shortcut for vuepress-theme-hope.
7
7
  ## Usage
8
8
 
9
9
  ```bash
10
- npm init vuepress-theme-hope <dir>
10
+ npm init vuepress-theme-hope@next <dir>
11
11
  ```
12
12
 
13
- Or
13
+ <!-- Or
14
14
 
15
15
  ```bash
16
16
  yarn create vuepress-theme-hope <dir>
17
- ```
17
+ ``` -->
18
18
 
19
19
  ---
20
20
 
@@ -23,11 +23,11 @@ yarn create vuepress-theme-hope <dir>
23
23
  ## 使用
24
24
 
25
25
  ```bash
26
- npm init vuepress-theme-hope <dir>
26
+ npm init vuepress-theme-hope@next <dir>
27
27
  ```
28
28
 
29
- 或
29
+ <!-- 或
30
30
 
31
31
  ```bash
32
32
  yarn create vuepress-theme-hope <dir>
33
- ```
33
+ ``` -->
@@ -1,6 +1,6 @@
1
1
  import { get } from "https";
2
2
 
3
- export const checkForLatestVersion = (packageName: string): Promise<string> =>
3
+ export const checkForNextVersion = (packageName: string): Promise<string> =>
4
4
  new Promise((resolve, reject) => {
5
5
  get(
6
6
  `https://registry.npmjs.org/-/package/${packageName}/dist-tags`,
package/src/node/i18n.ts CHANGED
@@ -19,6 +19,7 @@ export interface CreateI18n {
19
19
  versionError: string;
20
20
  descriptionMessage: string;
21
21
  licenseMessage: string;
22
+ i18nMessage: string;
22
23
  }
23
24
 
24
25
  export const i18n: Record<Lang, CreateI18n> = {
@@ -40,6 +41,7 @@ export const i18n: Record<Lang, CreateI18n> = {
40
41
  versionError: "此版本无效,版本号应为 'x.x.x'",
41
42
  descriptionMessage: "设置应用描述",
42
43
  licenseMessage: "设置协议",
44
+ i18nMessage: "项目需要用到多语言么?",
43
45
  },
44
46
  "en-US": {
45
47
  getVersion: "Getting lastest version of deps...",
@@ -61,6 +63,7 @@ export const i18n: Record<Lang, CreateI18n> = {
61
63
  "This version is not a valid one. Version should be like 'x.x.x'",
62
64
  descriptionMessage: "Your project description",
63
65
  licenseMessage: "Your project lincense",
66
+ i18nMessage: "Does the project need mutiple languages?",
64
67
  },
65
68
  };
66
69
 
package/src/node/index.ts CHANGED
@@ -6,7 +6,7 @@ import { cac } from "cac";
6
6
  import { prompt } from "inquirer";
7
7
  import execa from "execa";
8
8
  import { copy } from "./copy";
9
- import { checkForLatestVersion } from "./checkVersion";
9
+ import { checkForNextVersion } from "./checkVersion";
10
10
  import { detectYarn } from "./hasYarn";
11
11
  import { getLanguage } from "./i18n";
12
12
  import { getRegistry } from "./registry";
@@ -25,15 +25,14 @@ cli
25
25
  const packageJsonPath = resolve(process.cwd(), "package.json");
26
26
  const scripts = {
27
27
  "docs:build": `vuepress build ${dir}`,
28
- "docs:clean-dev": `vuepress dev ${dir} --no-cache`,
28
+ "docs:clean-dev": `vuepress dev ${dir} --clean-cache`,
29
29
  "docs:dev": `vuepress dev ${dir}`,
30
- "docs:eject-theme": `vuepress eject-hope ${dir}`,
31
30
  };
32
31
 
33
32
  console.log(message.getVersion);
34
33
 
35
- const vuepressVersion = await checkForLatestVersion("vuepress");
36
- const themeVersion = await checkForLatestVersion("vuepress-theme-hope");
34
+ const vuepressVersion = await checkForNextVersion("vuepress");
35
+ const themeVersion = await checkForNextVersion("vuepress-theme-hope");
37
36
 
38
37
  const devDependencies = {
39
38
  vuepress: `^${vuepressVersion}`,
@@ -72,7 +71,7 @@ cli
72
71
  name: "name",
73
72
  type: "input",
74
73
  message: message.nameMessage,
75
- default: "vuepress-theme-hope-project",
74
+ default: "vuepress-theme-hope-template",
76
75
  validate: (input: string): true | string =>
77
76
  /^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/u.exec(
78
77
  input
@@ -84,7 +83,7 @@ cli
84
83
  name: "version",
85
84
  type: "input",
86
85
  message: message.versionMessage,
87
- default: "1.0.0",
86
+ default: "2.0.0",
88
87
  validate: (input: string): true | string =>
89
88
  /^[0-9]+\.[0-9]+\.(?:[0=9]+|[0-9]+-[a-z]+\.[0-9])$/u.exec(input)
90
89
  ? true
@@ -113,9 +112,27 @@ cli
113
112
  );
114
113
  }
115
114
 
115
+ interface I18nAnswer {
116
+ i18n: "Yes" | "No";
117
+ }
118
+
119
+ const { i18n } = await prompt<I18nAnswer>([
120
+ {
121
+ name: "i18n",
122
+ type: "list",
123
+ message: message.i18nMessage,
124
+ choices: ["Yes", "No"],
125
+ },
126
+ ]);
127
+
116
128
  console.log(message.template);
117
129
 
118
- copy(resolve(__dirname, "../template"), resolve(process.cwd(), dir));
130
+ const templateFolder = i18n === "Yes" ? "i18n" : lang;
131
+
132
+ copy(
133
+ resolve(__dirname, "../../template", templateFolder),
134
+ resolve(process.cwd(), dir)
135
+ );
119
136
 
120
137
  console.log(message.install);
121
138
  console.warn(message.wait);
@@ -0,0 +1,28 @@
1
+ import { defineHopeConfig } from "vuepress-theme-hope";
2
+ import themeConfig from "./themeConfig";
3
+
4
+ export default defineHopeConfig({
5
+ base: "/",
6
+
7
+ dest: "./dist",
8
+
9
+ head: [
10
+ [
11
+ "link",
12
+ {
13
+ rel: "stylesheet",
14
+ href: "//at.alicdn.com/t/font_2410206_mfj6e1vbwo.css",
15
+ },
16
+ ],
17
+ ],
18
+
19
+ locales: {
20
+ "/": {
21
+ lang: "en-US",
22
+ title: "Theme Demo",
23
+ description: "A demo for vuepress-theme-hope",
24
+ },
25
+ },
26
+
27
+ themeConfig,
28
+ });
@@ -0,0 +1,52 @@
1
+ import { defineNavbarConfig } from "vuepress-theme-hope";
2
+
3
+ export default defineNavbarConfig([
4
+ "/",
5
+ "/home",
6
+ { text: "Guide", icon: "creative", link: "/guide/" },
7
+ {
8
+ text: "Posts",
9
+ icon: "edit",
10
+ prefix: "/posts/",
11
+ children: [
12
+ {
13
+ text: "Articles 1-4",
14
+ icon: "edit",
15
+ prefix: "article/",
16
+ children: [
17
+ { text: "Article 1", icon: "edit", link: "article1" },
18
+ { text: "Article 2", icon: "edit", link: "article2" },
19
+ "article3",
20
+ "article4",
21
+ ],
22
+ },
23
+ {
24
+ text: "Articles 5-12",
25
+ icon: "edit",
26
+ children: [
27
+ {
28
+ text: "Article 5",
29
+ icon: "edit",
30
+ link: "article/article5",
31
+ },
32
+ {
33
+ text: "Article 6",
34
+ icon: "edit",
35
+ link: "article/article6",
36
+ },
37
+ "article/article7",
38
+ "article/article8",
39
+ ],
40
+ },
41
+ { text: "Article 9", icon: "edit", link: "article9" },
42
+ { text: "Article 10", icon: "edit", link: "article10" },
43
+ "article11",
44
+ "article12",
45
+ ],
46
+ },
47
+ {
48
+ text: "Theme Docs",
49
+ icon: "note",
50
+ link: "https://vuepress-theme-hope.github.io/v2/",
51
+ },
52
+ ]);