Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@huyikai/vitepress-helper

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@huyikai/vitepress-helper - npm Package Compare versions

Comparing version 0.0.10 to 0.0.11

2

bin/create.ts

@@ -48,3 +48,3 @@ import { blodText } from './utils';

: undefined;
packageInfo.devDependencies['@huyikai/vitepress-helper'] = '^0.0.10';
packageInfo.devDependencies['@huyikai/vitepress-helper'] = '^0.0.11';
packageInfo.devDependencies['@huyikai/local-cms'] = cms

@@ -51,0 +51,0 @@ ? 'latest'

#!/usr/bin/env node
import{Command as e}from"commander";import o from"chalk";import{execSync as n}from"child_process";import i from"fs-extra";import t from"ora";import r from"path";import s from"figlet";import{fileURLToPath as a}from"url";import m from"inquirer";const l=e=>o.blue.bold(e),p=process.cwd(),c=t();const u=new e,d=r.dirname(a(import.meta.url)),h=r.join(d,"./../../package.json"),y=JSON.parse(i.readFileSync(h,"utf8"));u.name("VitePress-Helper").description("A Tool for Enhance VitePress Experience\r\n一个增强VitePress体验的工具").helpOption("-h, --help","Display help for command\r\n显示命令的帮助").version(y.version,"-v,-V, --version","Output current version information\r\n输出当前版本信息"),u.command("init").description("Guide to complete the initialization operation\r\n完成初始化操作的指南").summary("initialization\r\n初始化").action((async()=>{(async e=>{const{name:o,author:t,version:s,cms:a}=e;c.start("Installing..."),n("npm init -y"),n("npm install @huyikai/vitepress-helper",{stdio:"inherit"});const m=r.join(p,"node_modules/@huyikai/vitepress-helper/template"),u=r.join(p,"");i.copySync(m,u),(()=>{const e=r.join(p,"package.json");let n=JSON.parse(i.readFileSync(e).toString());n.name=o,n.author=t,n.version=s,n.scripts.cms=a?"node node_modules/@huyikai/local-cms/cms.js docs":void 0,n.devDependencies["@huyikai/vitepress-helper"]="^0.0.10",n.devDependencies["@huyikai/local-cms"]=a?"latest":void 0,i.writeFileSync(e,JSON.stringify(n,null,2))})(),n("npm i",{stdio:"inherit"}),c.succeed("Install Complete!!!"),console.log(`\r\nNow you can:\r\nrun ${l("npm run dev")} to preview`+(a?`\r\nrun ${l("npm run cms")} to manage content`:""))})(await m.prompt([{name:"name",message:"Project Name",type:"input",default:"my-docs"},{name:"author",description:"Input Author Name",message:"Author",default:"huyikai"},{name:"version",description:"Version",message:"Version",default:"1.0.0"},{name:"cms",message:"Do you need local CMS?",default:!0,type:"list",choices:[{name:"yes",value:!0},{name:"no",value:!1}]}]))})),u.usage("<command> [option]"),u.on("--help",(()=>{console.log(`\r\nRun ${l("vitepress-helper <command> --help")} for detailed usage of given command`),console.log(`\r\nGitHub: ${l("https://github.com/huyikai/vitepress-helper")}`),console.log(`\r\nHomePage: ${l("https://huyikai.github.io/vitepress-helper")}`),console.log("\r\n"+o.hex("#41B883").bgHex("#35495E").bold(s.textSync("VitePress-Helper",{font:"Standard",horizontalLayout:"default",verticalLayout:"default",width:80,whitespaceBreak:!1})))})),u.parse(process.argv);
import{Command as e}from"commander";import o from"chalk";import{execSync as n}from"child_process";import i from"fs-extra";import t from"ora";import r from"path";import s from"figlet";import{fileURLToPath as a}from"url";import m from"inquirer";const l=e=>o.blue.bold(e),p=process.cwd(),c=t();const u=new e,d=r.dirname(a(import.meta.url)),h=r.join(d,"./../../package.json"),y=JSON.parse(i.readFileSync(h,"utf8"));u.name("VitePress-Helper").description("A Tool for Enhance VitePress Experience\r\n一个增强VitePress体验的工具").helpOption("-h, --help","Display help for command\r\n显示命令的帮助").version(y.version,"-v,-V, --version","Output current version information\r\n输出当前版本信息"),u.command("init").description("Guide to complete the initialization operation\r\n完成初始化操作的指南").summary("initialization\r\n初始化").action((async()=>{(async e=>{const{name:o,author:t,version:s,cms:a}=e;c.start("Installing..."),n("npm init -y"),n("npm install @huyikai/vitepress-helper",{stdio:"inherit"});const m=r.join(p,"node_modules/@huyikai/vitepress-helper/template"),u=r.join(p,"");i.copySync(m,u),(()=>{const e=r.join(p,"package.json");let n=JSON.parse(i.readFileSync(e).toString());n.name=o,n.author=t,n.version=s,n.scripts.cms=a?"node node_modules/@huyikai/local-cms/cms.js docs":void 0,n.devDependencies["@huyikai/vitepress-helper"]="^0.0.11",n.devDependencies["@huyikai/local-cms"]=a?"latest":void 0,i.writeFileSync(e,JSON.stringify(n,null,2))})(),n("npm i",{stdio:"inherit"}),c.succeed("Install Complete!!!"),console.log(`\r\nNow you can:\r\nrun ${l("npm run dev")} to preview`+(a?`\r\nrun ${l("npm run cms")} to manage content`:""))})(await m.prompt([{name:"name",message:"Project Name",type:"input",default:"my-docs"},{name:"author",description:"Input Author Name",message:"Author",default:"huyikai"},{name:"version",description:"Version",message:"Version",default:"1.0.0"},{name:"cms",message:"Do you need local CMS?",default:!0,type:"list",choices:[{name:"yes",value:!0},{name:"no",value:!1}]}]))})),u.usage("<command> [option]"),u.on("--help",(()=>{console.log(`\r\nRun ${l("vitepress-helper <command> --help")} for detailed usage of given command`),console.log(`\r\nGitHub: ${l("https://github.com/huyikai/vitepress-helper")}`),console.log(`\r\nHomePage: ${l("https://huyikai.github.io/vitepress-helper")}`),console.log("\r\n"+o.hex("#41B883").bgHex("#35495E").bold(s.textSync("VitePress-Helper",{font:"Standard",horizontalLayout:"default",verticalLayout:"default",width:80,whitespaceBreak:!1})))})),u.parse(process.argv);
//# sourceMappingURL=index.js.map
{
"name": "@huyikai/vitepress-helper",
"version": "0.0.10",
"version": "0.0.11",
"private": false,

@@ -47,2 +47,3 @@ "description": "This tool is designed to help you to use VitePress more easily.",

"gray-matter": "^4.0.2",
"inquirer": "^9.2.12",
"tree-conver": "^0.0.95",

@@ -49,0 +50,0 @@ "uuid": "^9.0.1"

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc