create-vuepress-theme-hope 2.0.0-rc.49 → 2.0.0-rc.50

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 (2) hide show
  1. package/lib/index.js +1 -1
  2. package/package.json +3 -3
package/lib/index.js CHANGED
@@ -64,7 +64,7 @@ For example: "${e} init vuepress-theme-hope docs"`,dirNotEmpty:e=>`Target folder
64
64
  启动成功后,请在浏览器输入给出的开发服务器地址(默认为 'localhost:8080')`},question:{packageManager:"选择包管理器",i18n:"项目需要用到多语言么?",git:"是否初始化 Git 仓库?",workflow:"是否需要一个自动部署文档到 GitHub Pages 的工作流?",bundler:"你想要使用哪个打包器?",preset:"你想要创建什么类型的项目?",devServer:"是否想要现在启动 Demo 查看?",name:"设置应用名称",version:"设置应用版本号",description:"设置应用描述",license:"设置协议"},hint:{install:`这可能需要数分钟,请耐心等待.
65
65
  我们无法正确输出子进程的进度条,所以进程可能会看似未响应`,finish:"模板已成功生成!",devServer:e=>`提示: 请使用 "${e} run docs:dev" 命令启动开发服务器`},workflow:{name:"部署文档",checkout:"检出代码",submodule:"如果你文档需要 Git 子模块,取消注释下一行",setupPnpm:"设置 pnpm",setupNode:"设置 Node.js",install:"安装依赖",build:"构建文档",deploy:"部署文档",deployBranch:"这是文档部署到的分支名称"},error:{name:"应用名称应只包含小写字母、数字和连接线 (-)",version:"此版本无效,版本号应为 'x.x.x'",bundler:"打包器 (--bundler) 仅支持 vite 或 webpack",preset:"预设 (--preset) 仅支持 docs 或 blog",outputDirMissing:e=>`"[dir]" 的方括号表示此处为一个参数,你应该替换为自己想使用的文件夹名称,如 "my-blog", "project-docs" 等!
66
66
  例如: "${e} init vuepress-theme-hope project-docs"`,updateDirMissing:e=>`"[dir]" 的方括号表示此处为一个参数,你应该替换为自己想使用的文件夹名称,如 "src", "docs" 等!
67
- 例如: "${e} init vuepress-theme-hope docs"`,dirNotEmpty:e=>`目标文件夹 "${e}" 不为空,请选择一个空文件夹或者手动删除文件夹中的文件`}},ie={"english (US)":ne,简体中文:ae},ce=async()=>{const{language:e}=await u.prompt([{name:"language",type:"list",message:"Select a language to display / 选择显示语言",choices:["english (US)","简体中文"]}]);return{lang:e,locale:ie[e]}},pe=(e,t,o)=>({"docs:build":`vuepress-${t} build ${o}`,"docs:clean-dev":`vuepress-${t} dev ${o} --clean-cache`,"docs:dev":`vuepress-${t} dev ${o}`,"docs:update-package":`${e==="npm"?"npx":`${e} dlx`} vp-update`}),_=async({packageManager:e,locale:t,source:o,bundler:s,cwd:r=process.cwd()})=>{s||({bundler:s}=await u.prompt([{name:"bundler",type:"list",message:t.question.bundler,choices:D}]));const a=n(r,"package.json"),i=pe(e,s,o),l={[`@vuepress/bundler-${s}`]:"2.0.0-rc.13",vue:"^3.4.27",vuepress:"2.0.0-rc.13","vuepress-theme-hope":P};if(s==="webpack"&&(l["sass-loader"]="^14.2.1"),f(a)){console.log(t.flow.updatePackage);const c=JSON.parse(b(a,{encoding:"utf-8"}));y(c,{scripts:i,devDependencies:l}),h(a,`${JSON.stringify(c,null,2)}
67
+ 例如: "${e} init vuepress-theme-hope docs"`,dirNotEmpty:e=>`目标文件夹 "${e}" 不为空,请选择一个空文件夹或者手动删除文件夹中的文件`}},ie={"english (US)":ne,简体中文:ae},ce=async()=>{const{language:e}=await u.prompt([{name:"language",type:"list",message:"Select a language to display / 选择显示语言",choices:["english (US)","简体中文"]}]);return{lang:e,locale:ie[e]}},pe=(e,t,o)=>({"docs:build":`vuepress-${t} build ${o}`,"docs:clean-dev":`vuepress-${t} dev ${o} --clean-cache`,"docs:dev":`vuepress-${t} dev ${o}`,"docs:update-package":`${e==="npm"?"npx":`${e} dlx`} vp-update`}),_=async({packageManager:e,locale:t,source:o,bundler:s,cwd:r=process.cwd()})=>{s||({bundler:s}=await u.prompt([{name:"bundler",type:"list",message:t.question.bundler,choices:D}]));const a=n(r,"package.json"),i=pe(e,s,o),l={[`@vuepress/bundler-${s}`]:"2.0.0-rc.14",vue:"^3.4.27",vuepress:"2.0.0-rc.14","vuepress-theme-hope":P};if(s==="webpack"&&(l["sass-loader"]="^14.2.1"),f(a)){console.log(t.flow.updatePackage);const c=JSON.parse(b(a,{encoding:"utf-8"}));y(c,{scripts:i,devDependencies:l}),h(a,`${JSON.stringify(c,null,2)}
68
68
  `,{encoding:"utf-8"})}else{console.log(t.flow.createPackage);const c={...await u.prompt([{name:"name",type:"input",message:t.question.name,default:"vuepress-theme-hope-template",validate:m=>B.exec(m)?!0:t.error.name},{name:"version",type:"input",message:t.question.version,default:"2.0.0",validate:m=>L.exec(m)?!0:t.error.version},{name:"description",type:"input",message:t.question.description,default:"A project of vuepress-theme-hope"},{name:"license",type:"input",message:t.question.license,default:"MIT"}]),type:"module",scripts:i,devDependencies:l};h(a,`${JSON.stringify(c,null,2)}
69
69
  `,{encoding:"utf-8"})}},q=({source:e,locale:t,cwd:o=process.cwd()})=>{const s=n(o,"tsconfig.json");if(f(s)){console.log(t.flow.updateTsConfig);const r=JSON.parse(b(s,{encoding:"utf-8"}));y(r,{compilerOptions:{module:"NodeNext",moduleResolution:"NodeNext"},include:[...r.include??[],`${e}/.vuepress/**/*.ts`,`${e}/.vuepress/**/*.vue`]}),h(s,`${JSON.stringify(r,null,2)}
70
70
  `,{encoding:"utf-8"})}else{console.log(t.flow.createTsConfig);const r={compilerOptions:{module:"NodeNext",moduleResolution:"NodeNext",target:"ES2022"},include:[`${e}/.vuepress/**/*.ts`,`${e}/.vuepress/**/*.vue`],exclude:["node_modules"]};h(s,`${JSON.stringify(r,null,2)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-vuepress-theme-hope",
3
- "version": "2.0.0-rc.49",
3
+ "version": "2.0.0-rc.50",
4
4
  "description": "Create vuepress-theme-hope demo project helper",
5
5
  "keywords": [
6
6
  "create",
@@ -44,8 +44,8 @@
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/inquirer": "9.0.7",
47
- "vuepress": "2.0.0-rc.13",
48
- "vuepress-theme-hope": "2.0.0-rc.49"
47
+ "vuepress": "2.0.0-rc.14",
48
+ "vuepress-theme-hope": "2.0.0-rc.50"
49
49
  },
50
50
  "engines": {
51
51
  "node": ">=18.19.0",