create-vuepress-theme-hope 2.0.0-beta.3 → 2.0.0-beta.30

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 (166) hide show
  1. package/{readme.md → README.md} +0 -0
  2. package/lib/index.js +3 -0
  3. package/lib/index.js.map +1 -0
  4. package/package.json +11 -5
  5. package/src/checkVersion.ts +42 -0
  6. package/src/{node/copy.ts → copy.ts} +1 -1
  7. package/src/{node/deepAssign.ts → deepAssign.ts} +0 -0
  8. package/src/{node/hasYarn.ts → hasYarn.ts} +1 -0
  9. package/src/{node/i18n.ts → i18n.ts} +11 -0
  10. package/src/{node/index.ts → index.ts} +32 -17
  11. package/src/{node/registry.ts → registry.ts} +0 -0
  12. package/template/en-US/.vuepress/sidebar.ts +1 -2
  13. package/template/en-US/.vuepress/themeConfig.ts +26 -3
  14. package/template/en-US/guide/README.md +1 -0
  15. package/template/en-US/guide/disable.md +1 -0
  16. package/template/en-US/guide/encrypt.md +1 -1
  17. package/template/en-US/guide/markdown.md +40 -3
  18. package/template/en-US/guide/page.md +9 -3
  19. package/template/en-US/home.md +3 -3
  20. package/template/i18n/.vuepress/sidebar/en.ts +1 -2
  21. package/template/i18n/.vuepress/sidebar/zh.ts +2 -1
  22. package/template/i18n/.vuepress/themeConfig.ts +26 -12
  23. package/template/i18n/guide/README.md +1 -0
  24. package/template/i18n/guide/disable.md +1 -0
  25. package/template/i18n/guide/markdown.md +39 -2
  26. package/template/i18n/guide/page.md +6 -0
  27. package/template/i18n/home.md +3 -3
  28. package/template/i18n/zh/README.md +1 -1
  29. package/template/i18n/zh/guide/README.md +1 -0
  30. package/template/i18n/zh/guide/disable.md +1 -0
  31. package/template/i18n/zh/guide/markdown.md +38 -1
  32. package/template/i18n/zh/guide/page.md +6 -0
  33. package/template/i18n/zh/home.md +3 -3
  34. package/template/zh-CN/.vuepress/.cache/default-development/0.pack +0 -0
  35. package/template/zh-CN/.vuepress/.cache/default-development/1.pack +0 -0
  36. package/template/zh-CN/.vuepress/.cache/default-development/10.pack +0 -0
  37. package/template/zh-CN/.vuepress/.cache/default-development/11.pack +0 -0
  38. package/template/zh-CN/.vuepress/.cache/default-development/12.pack +0 -0
  39. package/template/zh-CN/.vuepress/.cache/default-development/13.pack +0 -0
  40. package/template/zh-CN/.vuepress/.cache/default-development/14.pack +0 -0
  41. package/template/zh-CN/.vuepress/.cache/default-development/15.pack +0 -0
  42. package/template/zh-CN/.vuepress/.cache/default-development/16.pack +0 -0
  43. package/template/zh-CN/.vuepress/.cache/default-development/17.pack +0 -0
  44. package/template/zh-CN/.vuepress/.cache/default-development/2.pack +0 -0
  45. package/template/zh-CN/.vuepress/.cache/default-development/3.pack +0 -0
  46. package/template/zh-CN/.vuepress/.cache/default-development/4.pack +0 -0
  47. package/template/zh-CN/.vuepress/.cache/default-development/5.pack +0 -0
  48. package/template/zh-CN/.vuepress/.cache/default-development/6.pack +0 -0
  49. package/template/zh-CN/.vuepress/.cache/default-development/7.pack +0 -0
  50. package/template/zh-CN/.vuepress/.cache/default-development/8.pack +0 -0
  51. package/template/zh-CN/.vuepress/.cache/default-development/9.pack +0 -0
  52. package/template/zh-CN/.vuepress/.cache/default-development/index.pack +0 -0
  53. package/template/zh-CN/.vuepress/.cache/default-development/index.pack.old +0 -0
  54. package/template/zh-CN/.vuepress/.temp/blog/category.js +14 -0
  55. package/template/zh-CN/.vuepress/.temp/blog/type.js +14 -0
  56. package/template/zh-CN/.vuepress/.temp/internal/clientAppEnhances.js +23 -0
  57. package/template/zh-CN/.vuepress/.temp/internal/clientAppRootComponents.js +7 -0
  58. package/template/zh-CN/.vuepress/.temp/internal/clientAppSetups.js +15 -0
  59. package/template/zh-CN/.vuepress/.temp/internal/layoutComponents.js +8 -0
  60. package/template/zh-CN/.vuepress/.temp/internal/pagesComponents.js +80 -0
  61. package/template/zh-CN/.vuepress/.temp/internal/pagesData.js +78 -0
  62. package/template/zh-CN/.vuepress/.temp/internal/pagesRoutes.js +67 -0
  63. package/template/zh-CN/.vuepress/.temp/internal/siteData.js +35 -0
  64. package/template/zh-CN/.vuepress/.temp/internal/themeData.js +305 -0
  65. package/template/zh-CN/.vuepress/.temp/pages/404.html.js +61 -0
  66. package/template/zh-CN/.vuepress/.temp/pages/404.html.vue +1 -0
  67. package/template/zh-CN/.vuepress/.temp/pages/article/index.html.js +73 -0
  68. package/template/zh-CN/.vuepress/.temp/pages/article/index.html.vue +1 -0
  69. package/template/zh-CN/.vuepress/.temp/pages/category/categorya/index.html.js +74 -0
  70. package/template/zh-CN/.vuepress/.temp/pages/category/categorya/index.html.vue +1 -0
  71. package/template/zh-CN/.vuepress/.temp/pages/category/categoryb/index.html.js +74 -0
  72. package/template/zh-CN/.vuepress/.temp/pages/category/categoryb/index.html.vue +1 -0
  73. package/template/zh-CN/.vuepress/.temp/pages/category/index.html.js +73 -0
  74. package/template/zh-CN/.vuepress/.temp/pages/category/index.html.vue +1 -0
  75. package/template/zh-CN/.vuepress/.temp/pages/category//344/275/277/347/224/250/346/214/207/345/215/227/index.html.js +74 -0
  76. 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
  77. package/template/zh-CN/.vuepress/.temp/pages/encrypted/index.html.js +73 -0
  78. package/template/zh-CN/.vuepress/.temp/pages/encrypted/index.html.vue +1 -0
  79. package/template/zh-CN/.vuepress/.temp/pages/guide/disable.html.js +110 -0
  80. package/template/zh-CN/.vuepress/.temp/pages/guide/disable.html.vue +17 -0
  81. package/template/zh-CN/.vuepress/.temp/pages/guide/encrypt.html.js +91 -0
  82. package/template/zh-CN/.vuepress/.temp/pages/guide/encrypt.html.vue +5 -0
  83. package/template/zh-CN/.vuepress/.temp/pages/guide/index.html.js +87 -0
  84. package/template/zh-CN/.vuepress/.temp/pages/guide/index.html.vue +16 -0
  85. package/template/zh-CN/.vuepress/.temp/pages/guide/markdown.html.js +203 -0
  86. package/template/zh-CN/.vuepress/.temp/pages/guide/markdown.html.vue +201 -0
  87. package/template/zh-CN/.vuepress/.temp/pages/guide/page.html.js +144 -0
  88. package/template/zh-CN/.vuepress/.temp/pages/guide/page.html.vue +43 -0
  89. package/template/zh-CN/.vuepress/.temp/pages/home.html.js +200 -0
  90. package/template/zh-CN/.vuepress/.temp/pages/home.html.vue +4 -0
  91. package/template/zh-CN/.vuepress/.temp/pages/index.html.js +124 -0
  92. package/template/zh-CN/.vuepress/.temp/pages/index.html.vue +4 -0
  93. package/template/zh-CN/.vuepress/.temp/pages/posts/article/article1.html.js +121 -0
  94. package/template/zh-CN/.vuepress/.temp/pages/posts/article/article1.html.vue +6 -0
  95. package/template/zh-CN/.vuepress/.temp/pages/posts/article/article2.html.js +122 -0
  96. package/template/zh-CN/.vuepress/.temp/pages/posts/article/article2.html.vue +6 -0
  97. package/template/zh-CN/.vuepress/.temp/pages/posts/article/article3.html.js +122 -0
  98. package/template/zh-CN/.vuepress/.temp/pages/posts/article/article3.html.vue +6 -0
  99. package/template/zh-CN/.vuepress/.temp/pages/posts/article/article4.html.js +122 -0
  100. package/template/zh-CN/.vuepress/.temp/pages/posts/article/article4.html.vue +6 -0
  101. package/template/zh-CN/.vuepress/.temp/pages/posts/article/article5.html.js +122 -0
  102. package/template/zh-CN/.vuepress/.temp/pages/posts/article/article5.html.vue +6 -0
  103. package/template/zh-CN/.vuepress/.temp/pages/posts/article/article6.html.js +123 -0
  104. package/template/zh-CN/.vuepress/.temp/pages/posts/article/article6.html.vue +6 -0
  105. package/template/zh-CN/.vuepress/.temp/pages/posts/article/article7.html.js +122 -0
  106. package/template/zh-CN/.vuepress/.temp/pages/posts/article/article7.html.vue +6 -0
  107. package/template/zh-CN/.vuepress/.temp/pages/posts/article/article8.html.js +122 -0
  108. package/template/zh-CN/.vuepress/.temp/pages/posts/article/article8.html.vue +6 -0
  109. package/template/zh-CN/.vuepress/.temp/pages/posts/article10.html.js +122 -0
  110. package/template/zh-CN/.vuepress/.temp/pages/posts/article10.html.vue +6 -0
  111. package/template/zh-CN/.vuepress/.temp/pages/posts/article11.html.js +122 -0
  112. package/template/zh-CN/.vuepress/.temp/pages/posts/article11.html.vue +6 -0
  113. package/template/zh-CN/.vuepress/.temp/pages/posts/article12.html.js +123 -0
  114. package/template/zh-CN/.vuepress/.temp/pages/posts/article12.html.vue +6 -0
  115. package/template/zh-CN/.vuepress/.temp/pages/posts/article9.html.js +122 -0
  116. package/template/zh-CN/.vuepress/.temp/pages/posts/article9.html.vue +6 -0
  117. package/template/zh-CN/.vuepress/.temp/pages/slide.html.js +80 -0
  118. package/template/zh-CN/.vuepress/.temp/pages/slide.html.vue +2 -0
  119. package/template/zh-CN/.vuepress/.temp/pages/slides/index.html.js +73 -0
  120. package/template/zh-CN/.vuepress/.temp/pages/slides/index.html.vue +1 -0
  121. package/template/zh-CN/.vuepress/.temp/pages/star/index.html.js +73 -0
  122. package/template/zh-CN/.vuepress/.temp/pages/star/index.html.vue +1 -0
  123. package/template/zh-CN/.vuepress/.temp/pages/tag/index.html.js +73 -0
  124. package/template/zh-CN/.vuepress/.temp/pages/tag/index.html.vue +1 -0
  125. package/template/zh-CN/.vuepress/.temp/pages/tag/markdown/index.html.js +74 -0
  126. package/template/zh-CN/.vuepress/.temp/pages/tag/markdown/index.html.vue +1 -0
  127. package/template/zh-CN/.vuepress/.temp/pages/tag/tag-a/index.html.js +74 -0
  128. package/template/zh-CN/.vuepress/.temp/pages/tag/tag-a/index.html.vue +1 -0
  129. package/template/zh-CN/.vuepress/.temp/pages/tag/tag-b/index.html.js +74 -0
  130. package/template/zh-CN/.vuepress/.temp/pages/tag/tag-b/index.html.vue +1 -0
  131. package/template/zh-CN/.vuepress/.temp/pages/tag//344/275/277/347/224/250/346/214/207/345/215/227/index.html.js +74 -0
  132. 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
  133. package/template/zh-CN/.vuepress/.temp/pages/tag//346/226/207/347/253/240/345/212/240/345/257/206/index.html.js +74 -0
  134. 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
  135. package/template/zh-CN/.vuepress/.temp/pages/tag//347/246/201/347/224/250/index.html.js +74 -0
  136. package/template/zh-CN/.vuepress/.temp/pages/tag//347/246/201/347/224/250/index.html.vue +1 -0
  137. package/template/zh-CN/.vuepress/.temp/pages/tag//351/241/265/351/235/242/351/205/215/347/275/256/index.html.js +74 -0
  138. 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
  139. package/template/zh-CN/.vuepress/.temp/pages/timeline/index.html.js +73 -0
  140. package/template/zh-CN/.vuepress/.temp/pages/timeline/index.html.vue +1 -0
  141. package/template/zh-CN/.vuepress/.temp/sass-palette/hope-config.scss +6 -0
  142. package/template/zh-CN/.vuepress/.temp/sass-palette/hope-inject.scss +32 -0
  143. package/template/zh-CN/.vuepress/.temp/sass-palette/hope-palette.scss +4 -0
  144. package/template/zh-CN/.vuepress/.temp/sass-palette/hope-style.scss +1 -0
  145. package/template/zh-CN/.vuepress/.temp/sass-palette/load-hope.js +1 -0
  146. package/template/zh-CN/.vuepress/.temp/theme-hope/sidebar.js +1 -0
  147. package/template/zh-CN/.vuepress/.temp/theme-hope/socialMedia.js +1 -0
  148. package/template/zh-CN/.vuepress/.temp/theme-hope/theme-color.scss +1 -0
  149. package/template/zh-CN/.vuepress/sidebar.ts +2 -1
  150. package/template/zh-CN/.vuepress/themeConfig.ts +25 -7
  151. package/template/zh-CN/README.md +1 -1
  152. package/template/zh-CN/guide/README.md +1 -0
  153. package/template/zh-CN/guide/disable.md +1 -0
  154. package/template/zh-CN/guide/markdown.md +38 -1
  155. package/template/zh-CN/guide/page.md +6 -0
  156. package/template/zh-CN/home.md +3 -3
  157. package/workflows/en-US/deploy-docs.yml +42 -0
  158. package/workflows/zh-CN/deploy-docs.yml +42 -0
  159. package/CHANGELOG.md +0 -108
  160. package/lib/node/index.d.ts +0 -1
  161. package/lib/node/index.js +0 -3
  162. package/lib/node/index.js.map +0 -1
  163. package/rollup.config.js +0 -14
  164. package/src/node/checkVersion.ts +0 -31
  165. package/tsconfig.build.json +0 -10
  166. package/tsconfig.json +0 -8
File without changes
package/lib/index.js ADDED
@@ -0,0 +1,3 @@
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)},l=s=>{try{e.readdirSync(s)}catch(r){e.mkdirSync(s,{recursive:!0})}},p=(r,t)=>{const a=s.dirname(t);l(a);const n=e.createReadStream(r),o=e.createWriteStream(t);n.pipe(o)},d=(s,r)=>{l(r);e.readdirSync(s,{withFileTypes:!0}).forEach((e=>{e.isFile()?p(`${s}/${e.name}`,`${r}/${e.name}`):e.isDirectory()&&d(`${s}/${e.name}`,`${r}/${e.name}`)}))},u=(s,r)=>{e.statSync(s).isDirectory()?d(s,r):e.statSync(s).isFile()&&p(s,r)},g=async(e,s)=>{for(let r=1;r<=3;r++){const t=await new Promise(((r,t)=>{n.get(`${"npm"===s?"https://registry.npmjs.org":"https://registry.yarnpkg.com"}/-/package/${e}/dist-tags`,(e=>{if(200===e.statusCode){let s="";e.on("data",(e=>s+=e)),e.on("end",(()=>{r(JSON.parse(s).next)}))}else t()})).on("error",(()=>{t()}))})).catch((()=>{console.log(`Get ${e} version failed, [${r}/3]`)}));if(t)return t}throw new Error(`Get ${e} version failed!`)},m={"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'",dirError:"[dir] 是一个参数,你应该替换为自己想使用的文件夹名称,如 'src', 'docs' 等!",descriptionMessage:"设置应用描述",licenseMessage:"设置协议",i18nMessage:"项目需要用到多语言么?",workflowMessage:"是否需要一个自动部署文档到 GitHub Pages 的工作流?"},"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'",dirError:"[dir] is an arguement, you should replace it with folder name you want to use! E.g.: 'src', 'docs'",descriptionMessage:"Your project description",licenseMessage:"Your project lincense",i18nMessage:"Does the project need mutiple languages?",workflowMessage:"Do you need a GitHub workflow to deploy docs on GitHub pages?"}},y=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:m[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},h=r.cac("vuepress-theme-hope"),f=(()=>{try{return a.sync("yarn --version",{stdio:"ignore"}),!0}catch(e){return!1}})()?"yarn":"npm";h.command("[dir]","Generate a new vuepress-theme-hope project").action((async r=>{if(!r)return h.outputHelp();const{lang:a,message:n}=await y();if("[dir]"===r)return console.log(n.dirError);const o=s.resolve(process.cwd(),r),l=s.resolve(process.cwd(),"package.json"),p={"docs:build":`vuepress build ${r}`,"docs:clean-dev":`vuepress dev ${r} --clean-cache`,"docs:dev":`vuepress dev ${r}`};console.log(n.getVersion);const d={vuepress:`^${await g("vuepress",f)}`,"vuepress-theme-hope":`^${await g("vuepress-theme-hope",f)}`};if(e.existsSync(o)||e.mkdirSync(o),e.existsSync(l)){console.log(n.updatePackage);const s=JSON.parse(e.readFileSync(l,{encoding:"utf-8"}));c(s,{scripts:p,devDependencies:d}),e.writeFileSync(l,`${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:p,devDependencies:d};e.writeFileSync(l,`${JSON.stringify(s,null,2)}\n`,{encoding:"utf-8"})}const{i18n:m,workflow:w}=await t.prompt([{name:"i18n",type:"confirm",message:n.i18nMessage},{name:"workflow",type:"confirm",message:n.workflowMessage,default:!0}]);console.log(n.template);const k=m?"i18n":a;u(s.resolve(__dirname,"../template",k),s.resolve(process.cwd(),r)),w&&u(s.resolve(__dirname,"../workflows",a),s.resolve(process.cwd(),".github/workflows"));const S=await v(a,f);console.log(n.install),console.warn(n.wait),i.default.sync(f,["install","--registry",S],{stdout:"inherit"}),console.log(n.success);const{choise:$}=await t.prompt([{name:"choise",type:"confirm",message:n.devServerAsk,default:!0}]);$?(console.log(n.devServer),await i.default(f,["run","docs:dev"],{stdout:"inherit"})):console.log(n.hint)})),h.help((()=>[{title:"yarn create vuepress-theme-hope <dir> / npm init vuepress-theme-hope <dir>",body:"Create a vuepress-theme-hope template in <dir>"}])),h.parse();
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/deepAssign.ts","../src/copy.ts","../src/checkVersion.ts","../src/i18n.ts","../src/registry.ts","../src/index.ts","../src/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","recursive","copyFile","srcFile","targetFile","targetDir","dirname","rs","createReadStream","ws","createWriteStream","pipe","copyDir","srcDir","withFileTypes","file","isFile","name","isDirectory","copy","src","target","statSync","checkForNextVersion","async","packageName","bin","times","version","Promise","resolve","reject","get","res","statusCode","body","on","data","JSON","parse","next","catch","console","log","Error","i18n","getVersion","createPackage","updatePackage","template","wait","install","success","devServerAsk","devServer","hint","nameMessage","nameError","versionMessage","versionError","dirError","descriptionMessage","licenseMessage","i18nMessage","workflowMessage","getLanguage","language","prompt","type","message","choices","lang","getRegistry","userRegistry","sync","stdout","getUserRegistry","registry","cli","cac","stdio","e","detectYarn","command","action","dir","outputHelp","targetFolder","process","cwd","packageJsonPath","scripts","devDependencies","vuepress","existsSync","packageContent","readFileSync","encoding","writeFileSync","stringify","default","validate","input","exec","workflow","templateFolder","__dirname","warn","execa","choise","help","title"],"mappings":";mNAIO,MAAMA,EAA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QAASA,EAAQhB,aACjB+C,SAAS,KAITS,GACFnE,QAAQC,IAAI0B,EAAQf,iBAEdsD,EAAK,QAAClF,EAAK,CAAC,MAAO,YAAa,CACpCiD,OAAQ,aAELjC,QAAQC,IAAI0B,EAAQd,SAG/BuB,EAAIgC,MAAK,IAAM,CACb,CACEC,MACE,6EACF5E,KAAM,qDAIV2C,EAAIvC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-vuepress-theme-hope",
3
- "version": "2.0.0-beta.3",
3
+ "version": "2.0.0-beta.30",
4
4
  "description": "Create vuepress-theme-hope demo project helper",
5
5
  "keywords": [
6
6
  "create",
@@ -23,8 +23,14 @@
23
23
  "url": "https://mrhope.site"
24
24
  },
25
25
  "bin": {
26
- "create-vuepress-theme-hope": "./lib/node/index.js"
26
+ "create-vuepress-theme-hope": "./lib/index.js"
27
27
  },
28
+ "files": [
29
+ "lib",
30
+ "src",
31
+ "template",
32
+ "workflows"
33
+ ],
28
34
  "scripts": {
29
35
  "build": "rollup -c",
30
36
  "clean": "rimraf ./lib ./*.tsbuildinfo",
@@ -32,10 +38,10 @@
32
38
  "dev:ts": "tsc -b tsconfig.build.json --watch"
33
39
  },
34
40
  "dependencies": {
35
- "@types/inquirer": "^8.2.0",
41
+ "@types/inquirer": "^8.2.1",
36
42
  "cac": "^6.7.12",
37
43
  "execa": "^5.1.1",
38
- "inquirer": "^8.2.0"
44
+ "inquirer": "^8.2.2"
39
45
  },
40
- "gitHead": "503dd1f758ceddd6b65ff61e357bfacbfdb5136e"
46
+ "gitHead": "a32409b482434bb6abeee4dc426c90c4437243e8"
41
47
  }
@@ -0,0 +1,42 @@
1
+ import { get } from "https";
2
+
3
+ export const checkForNextVersion = async (
4
+ packageName: string,
5
+ bin: "npm" | "yarn"
6
+ ): Promise<string> => {
7
+ const getVersionInfo = (): Promise<string> =>
8
+ new Promise((resolve, reject) => {
9
+ get(
10
+ `${
11
+ bin === "npm"
12
+ ? "https://registry.npmjs.org"
13
+ : "https://registry.yarnpkg.com"
14
+ }/-/package/${packageName}/dist-tags`,
15
+ (res) => {
16
+ if (res.statusCode === 200) {
17
+ let body = "";
18
+
19
+ res.on("data", (data) => (body += data));
20
+ res.on("end", () => {
21
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
22
+ resolve(JSON.parse(body).next as string);
23
+ });
24
+ } else {
25
+ reject();
26
+ }
27
+ }
28
+ ).on("error", () => {
29
+ reject();
30
+ });
31
+ });
32
+
33
+ for (let times = 1; times <= 3; times++) {
34
+ const version = await getVersionInfo().catch(() => {
35
+ console.log(`Get ${packageName} version failed, [${times}/3]`);
36
+ });
37
+
38
+ if (version) return version;
39
+ }
40
+
41
+ throw new Error(`Get ${packageName} version failed!`);
42
+ };
@@ -11,7 +11,7 @@ const ensureDirExistSync = (dirPath: string): void => {
11
11
  try {
12
12
  readdirSync(dirPath);
13
13
  } catch (err) {
14
- mkdirSync(dirPath);
14
+ mkdirSync(dirPath, { recursive: true });
15
15
  }
16
16
  };
17
17
 
File without changes
@@ -3,6 +3,7 @@ import { sync } from "execa";
3
3
  export const detectYarn = (): boolean => {
4
4
  try {
5
5
  sync("yarn --version", { stdio: "ignore" });
6
+
6
7
  return true;
7
8
  } catch (e) {
8
9
  return false;
@@ -17,12 +17,15 @@ export interface CreateI18n {
17
17
  nameError: string;
18
18
  versionMessage: string;
19
19
  versionError: string;
20
+ dirError: string;
20
21
  descriptionMessage: string;
21
22
  licenseMessage: string;
22
23
  i18nMessage: string;
24
+ workflowMessage: string;
23
25
  }
24
26
 
25
27
  export const i18n: Record<Lang, CreateI18n> = {
28
+ // eslint-disable-next-line @typescript-eslint/naming-convention
26
29
  "zh-CN": {
27
30
  getVersion: "获取依赖的最新版本...",
28
31
  createPackage: "生成 package.json...",
@@ -39,10 +42,14 @@ export const i18n: Record<Lang, CreateI18n> = {
39
42
  nameError: "应用名称应只包含小写字母、数字和连接线 (-)",
40
43
  versionMessage: "设置应用版本号",
41
44
  versionError: "此版本无效,版本号应为 'x.x.x'",
45
+ dirError:
46
+ "[dir] 是一个参数,你应该替换为自己想使用的文件夹名称,如 'src', 'docs' 等!",
42
47
  descriptionMessage: "设置应用描述",
43
48
  licenseMessage: "设置协议",
44
49
  i18nMessage: "项目需要用到多语言么?",
50
+ workflowMessage: "是否需要一个自动部署文档到 GitHub Pages 的工作流?",
45
51
  },
52
+ // eslint-disable-next-line @typescript-eslint/naming-convention
46
53
  "en-US": {
47
54
  getVersion: "Getting lastest version of deps...",
48
55
  createPackage: "Generating package.json...",
@@ -61,9 +68,13 @@ export const i18n: Record<Lang, CreateI18n> = {
61
68
  versionMessage: "Your project version",
62
69
  versionError:
63
70
  "This version is not a valid one. Version should be like 'x.x.x'",
71
+ dirError:
72
+ "[dir] is an arguement, you should replace it with folder name you want to use! E.g.: 'src', 'docs'",
64
73
  descriptionMessage: "Your project description",
65
74
  licenseMessage: "Your project lincense",
66
75
  i18nMessage: "Does the project need mutiple languages?",
76
+ workflowMessage:
77
+ "Do you need a GitHub workflow to deploy docs on GitHub pages?",
67
78
  },
68
79
  };
69
80
 
@@ -21,18 +21,23 @@ cli
21
21
 
22
22
  const { lang, message } = await getLanguage();
23
23
 
24
+ if (dir === "[dir]") return console.log(message.dirError);
25
+
24
26
  const targetFolder = resolve(process.cwd(), dir);
25
27
  const packageJsonPath = resolve(process.cwd(), "package.json");
26
28
  const scripts = {
29
+ // eslint-disable-next-line @typescript-eslint/naming-convention
27
30
  "docs:build": `vuepress build ${dir}`,
31
+ // eslint-disable-next-line @typescript-eslint/naming-convention
28
32
  "docs:clean-dev": `vuepress dev ${dir} --clean-cache`,
33
+ // eslint-disable-next-line @typescript-eslint/naming-convention
29
34
  "docs:dev": `vuepress dev ${dir}`,
30
35
  };
31
36
 
32
37
  console.log(message.getVersion);
33
38
 
34
- const vuepressVersion = await checkForNextVersion("vuepress");
35
- const themeVersion = await checkForNextVersion("vuepress-theme-hope");
39
+ const vuepressVersion = await checkForNextVersion("vuepress", bin);
40
+ const themeVersion = await checkForNextVersion("vuepress-theme-hope", bin);
36
41
 
37
42
  const devDependencies = {
38
43
  vuepress: `^${vuepressVersion}`,
@@ -112,49 +117,59 @@ cli
112
117
  );
113
118
  }
114
119
 
115
- interface I18nAnswer {
116
- i18n: "Yes" | "No";
117
- }
118
-
119
- const { i18n } = await prompt<I18nAnswer>([
120
+ const { i18n, workflow } = await prompt<{
121
+ i18n: boolean;
122
+ workflow: boolean;
123
+ }>([
120
124
  {
121
125
  name: "i18n",
122
- type: "list",
126
+ type: "confirm",
123
127
  message: message.i18nMessage,
124
- choices: ["Yes", "No"],
128
+ },
129
+ {
130
+ name: "workflow",
131
+ type: "confirm",
132
+ message: message.workflowMessage,
133
+ default: true,
125
134
  },
126
135
  ]);
127
136
 
128
137
  console.log(message.template);
129
138
 
130
- const templateFolder = i18n === "Yes" ? "i18n" : lang;
139
+ const templateFolder = i18n ? "i18n" : lang;
131
140
 
132
141
  copy(
133
- resolve(__dirname, "../../template", templateFolder),
142
+ resolve(__dirname, "../template", templateFolder),
134
143
  resolve(process.cwd(), dir)
135
144
  );
136
145
 
137
- console.log(message.install);
138
- console.warn(message.wait);
146
+ if (workflow)
147
+ copy(
148
+ resolve(__dirname, "../workflows", lang),
149
+ resolve(process.cwd(), ".github/workflows")
150
+ );
139
151
 
140
152
  const registry = await getRegistry(lang, bin);
141
153
 
154
+ console.log(message.install);
155
+ console.warn(message.wait);
156
+
142
157
  execa.sync(bin, ["install", "--registry", registry], {
143
158
  stdout: "inherit",
144
159
  });
145
160
 
146
161
  console.log(message.success);
147
162
 
148
- const { choise } = await prompt<{ choise: "Yes" | "No" }>([
163
+ const { choise } = await prompt<{ choise: boolean }>([
149
164
  {
150
165
  name: "choise",
151
- type: "list",
166
+ type: "confirm",
152
167
  message: message.devServerAsk,
153
- choices: ["Yes", "No"],
168
+ default: true,
154
169
  },
155
170
  ]);
156
171
 
157
- if (choise === "Yes") {
172
+ if (choise) {
158
173
  console.log(message.devServer);
159
174
 
160
175
  await execa(bin, ["run", "docs:dev"], {
File without changes
@@ -7,10 +7,9 @@ export default defineSidebarConfig([
7
7
  {
8
8
  icon: "creative",
9
9
  text: "Guide",
10
- collapsable: true,
11
10
  prefix: "guide/",
12
11
  link: "guide/",
13
- children: ["page", "markdown", "disable", "encrypt"],
12
+ children: "structure",
14
13
  },
15
14
  {
16
15
  text: "Articles",
@@ -14,7 +14,7 @@ export default defineThemeConfig({
14
14
 
15
15
  logo: "/logo.svg",
16
16
 
17
- repo: "https://github.com/vuepress-theme-hope/vuepress-theme-hope",
17
+ repo: "vuepress-theme-hope/vuepress-theme-hope",
18
18
 
19
19
  docsDir: "demo/src",
20
20
 
@@ -28,6 +28,8 @@ export default defineThemeConfig({
28
28
 
29
29
  displayFooter: true,
30
30
 
31
+ pageInfo: ["Author", "Original", "Date", "Category", "Tag", "ReadingTime"],
32
+
31
33
  blog: {
32
34
  description: "A FrontEnd programmer",
33
35
  intro: "/intro.html",
@@ -75,9 +77,30 @@ export default defineThemeConfig({
75
77
  autoExcerpt: true,
76
78
  },
77
79
 
80
+ // If you don't need comment feature, you can remove following option
81
+ // The following config is for demo ONLY, if you need comment feature, please generate and use your own config, see comment plugin documentation for details.
82
+ // To avoid disturbing the theme developer and consuming his resources, please DO NOT use the following config directly in your production environment!!!!!
78
83
  comment: {
79
- type: "waline",
80
- serverURL: "https://vuepress-theme-hope-comment.vercel.app",
84
+ /**
85
+ * Using giscus
86
+ */
87
+ type: "giscus",
88
+ repo: "vuepress-theme-hope/giscus-discussions",
89
+ repoId: "R_kgDOG_Pt2A",
90
+ category: "Announcements",
91
+ categoryId: "DIC_kwDOG_Pt2M4COD69",
92
+
93
+ /**
94
+ * Using twikoo
95
+ */
96
+ // type: "twikoo",
97
+ // envId: "https://twikoo.ccknbc.vercel.app",
98
+
99
+ /**
100
+ * Using Waline
101
+ */
102
+ // type: "waline",
103
+ // serverURL: "https://vuepress-theme-hope-comment.vercel.app",
81
104
  },
82
105
 
83
106
  mdEnhance: {
@@ -1,4 +1,5 @@
1
1
  ---
2
+ index: false
2
3
  icon: creative
3
4
  category:
4
5
  - Guide
@@ -1,4 +1,5 @@
1
1
  ---
2
+ index: 3
2
3
  title: Component disabled
3
4
  icon: config
4
5
  category:
@@ -6,7 +6,7 @@ tag:
6
6
  - encryption
7
7
  ---
8
8
 
9
- # Encryption article
9
+ # Encryption Article
10
10
 
11
11
  The actual article content.
12
12
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ index: 2
2
3
  icon: markdown
3
4
  title: Markdown Enhance
4
5
  category:
@@ -13,7 +14,7 @@ You need to build your document or blog page by creating and writing Markdown in
13
14
 
14
15
  <!-- more -->
15
16
 
16
- ## Markdown introduction
17
+ ## Markdown Introduction
17
18
 
18
19
  If you are a new learner and don’t know how to write Markdown, please read [Markdown Intro](https://vuepress-theme-hope.github.io/v2/basic/markdown/README.html) and [Markdown Demo](https://vuepress-theme-hope.github.io/v2/basic/markdown/demo.html).
19
20
 
@@ -23,13 +24,13 @@ Frontmatter is a important concept in VuePress. If you don’t know it, you need
23
24
 
24
25
  :::
25
26
 
26
- ## VuePress enhance
27
+ ## VuePress Enhancement
27
28
 
28
29
  To enrich document writing, VuePress has extended Markdown syntax.
29
30
 
30
31
  For these extensions, please read [Markdown extensions in VuePress](https://vuepress-theme-hope.github.io/v2/basic/vuepress/markdown.html).
31
32
 
32
- ## Theme enhance
33
+ ## Theme Enhancement
33
34
 
34
35
  ### Enable all
35
36
 
@@ -200,6 +201,42 @@ You can mark ==important words== .
200
201
 
201
202
  - [View Detail](https://vuepress-theme-hope.github.io/v2/guide/markdown/tasklist.html)
202
203
 
204
+ ### Chart
205
+
206
+ ::: chart A Scatter Chart
207
+
208
+ ```json
209
+ {
210
+ "type": "scatter",
211
+ "data": {
212
+ "datasets": [
213
+ {
214
+ "label": "Scatter Dataset",
215
+ "data": [
216
+ { "x": -10, "y": 0 },
217
+ { "x": 0, "y": 10 },
218
+ { "x": 10, "y": 5 },
219
+ { "x": 0.5, "y": 5.5 }
220
+ ],
221
+ "backgroundColor": "rgb(255, 99, 132)"
222
+ }
223
+ ]
224
+ },
225
+ "options": {
226
+ "scales": {
227
+ "x": {
228
+ "type": "linear",
229
+ "position": "bottom"
230
+ }
231
+ }
232
+ }
233
+ }
234
+ ```
235
+
236
+ :::
237
+
238
+ - [View Detail](<[chart.md](https://vuepress-theme-hope.github.io/v2/guide/markdown/chart.html)>)
239
+
203
240
  ### Flowchart
204
241
 
205
242
  ```flow
@@ -1,4 +1,6 @@
1
1
  ---
2
+ # This control sidebar index
3
+ index: 1
2
4
  # This is the icon of the page
3
5
  icon: page
4
6
  # This is the title of the article
@@ -22,7 +24,11 @@ star: true
22
24
  footer: Footer content for test
23
25
  ---
24
26
 
25
- ## Page information
27
+ Content before `more` comment is regarded as page excerpt.
28
+
29
+ <!-- more -->
30
+
31
+ ## Page Information
26
32
 
27
33
  You can set page information in Markdown’s Frontmatter.
28
34
 
@@ -34,7 +40,7 @@ You can set page information in Markdown’s Frontmatter.
34
40
 
35
41
  - Tags are "Page Config" and "Guide"
36
42
 
37
- ## Page content
43
+ ## Page Content
38
44
 
39
45
  You are free to write your Markdown here.
40
46
 
@@ -50,7 +56,7 @@ The theme contains a custom badge:
50
56
 
51
57
  > A dark blue badge text badge at the end of line. <Badge text="Badge text" color="#242378" />
52
58
 
53
- ## Page structure
59
+ ## Page Structure
54
60
 
55
61
  This page should contain:
56
62
 
@@ -65,7 +65,7 @@ features:
65
65
  link: https://vuepress-theme-hope.github.io/v2/guide/feature/encrypt.html
66
66
 
67
67
  - title: Copy button
68
- icon: lock
68
+ icon: copy
69
69
  details: Copy codes with one click in code blocks
70
70
  link: https://vuepress-theme-hope.github.io/v2/guide/feature/copy-code.html
71
71
 
@@ -81,7 +81,7 @@ features:
81
81
 
82
82
  - title: Sitemap
83
83
  icon: sitemap
84
- details: Generate a Sitemap for your website
84
+ details: Generate a Sitemap for your site
85
85
  link: https://vuepress-theme-hope.github.io/v2/guide/advanced/sitemap.html
86
86
 
87
87
  - title: Feed support
@@ -91,7 +91,7 @@ features:
91
91
 
92
92
  - title: PWA support
93
93
  icon: mobile
94
- details: Make your website more like an APP
94
+ details: Make your site more like an APP
95
95
  link: https://vuepress-theme-hope.github.io/v2/guide/advanced/pwa.html
96
96
 
97
97
  - title: More new features
@@ -8,10 +8,9 @@ export const en = defineSidebarConfig({
8
8
  {
9
9
  icon: "creative",
10
10
  text: "Guide",
11
- collapsable: true,
12
11
  prefix: "guide/",
13
12
  link: "guide/",
14
- children: ["page", "markdown", "disable", "encrypt"],
13
+ children: "structure",
15
14
  },
16
15
  {
17
16
  text: "Articles",
@@ -9,7 +9,8 @@ export const zh = defineSidebarConfig({
9
9
  text: "如何使用",
10
10
  icon: "creative",
11
11
  prefix: "guide/",
12
- children: ["", "page", "markdown", "disable", "encrypt"],
12
+ link: "guide/",
13
+ children: "structure",
13
14
  },
14
15
  {
15
16
  text: "文章",
@@ -14,10 +14,12 @@ export default defineThemeConfig({
14
14
 
15
15
  logo: "/logo.svg",
16
16
 
17
- repo: "https://github.com/vuepress-theme-hope/vuepress-theme-hope",
17
+ repo: "vuepress-theme-hope/vuepress-theme-hope",
18
18
 
19
19
  docsDir: "demo/src",
20
20
 
21
+ pageInfo: ["Author", "Original", "Date", "Category", "Tag", "ReadingTime"],
22
+
21
23
  blog: {
22
24
  medias: {
23
25
  Baidu: "https://example.com",
@@ -68,10 +70,6 @@ export default defineThemeConfig({
68
70
  description: "A FrontEnd programmer",
69
71
  intro: "/intro.html",
70
72
  },
71
-
72
- metaLocales: {
73
- editLink: "Edit this page on GitHub",
74
- },
75
73
  },
76
74
 
77
75
  /**
@@ -92,11 +90,6 @@ export default defineThemeConfig({
92
90
  description: "一个前端开发者",
93
91
  intro: "/zh/intro.html",
94
92
  },
95
-
96
- // page meta
97
- metaLocales: {
98
- editLink: "在 GitHub 上编辑此页",
99
- },
100
93
  },
101
94
  },
102
95
 
@@ -112,9 +105,30 @@ export default defineThemeConfig({
112
105
  autoExcerpt: true,
113
106
  },
114
107
 
108
+ // If you don't need comment feature, you can remove following option
109
+ // The following config is for demo ONLY, if you need comment feature, please generate and use your own config, see comment plugin documentation for details.
110
+ // To avoid disturbing the theme developer and consuming his resources, please DO NOT use the following config directly in your production environment!!!!!
115
111
  comment: {
116
- type: "waline",
117
- serverURL: "https://vuepress-theme-hope-comment.vercel.app",
112
+ /**
113
+ * Using giscus
114
+ */
115
+ type: "giscus",
116
+ repo: "vuepress-theme-hope/giscus-discussions",
117
+ repoId: "R_kgDOG_Pt2A",
118
+ category: "Announcements",
119
+ categoryId: "DIC_kwDOG_Pt2M4COD69",
120
+
121
+ /**
122
+ * Using twikoo
123
+ */
124
+ // type: "twikoo",
125
+ // envId: "https://twikoo.ccknbc.vercel.app",
126
+
127
+ /**
128
+ * Using Waline
129
+ */
130
+ // type: "waline",
131
+ // serverURL: "https://vuepress-theme-hope-comment.vercel.app",
118
132
  },
119
133
 
120
134
  mdEnhance: {
@@ -1,4 +1,5 @@
1
1
  ---
2
+ index: false
2
3
  icon: creative
3
4
  category:
4
5
  - Guide
@@ -1,4 +1,5 @@
1
1
  ---
2
+ index: 3
2
3
  title: Component disabled
3
4
  icon: config
4
5
  category: