New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.26 to 0.0.27

lib/types/utils/sidebarHelpers.d.ts

2

lib/bin/index.js
#!/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="0.0.25",c=process.cwd(),u=t();const d=new e,h=r.dirname(a(import.meta.url)),y=r.join(h,"./../../package.json"),f=JSON.parse(i.readFileSync(y,"utf8"));d.name("VitePress-Helper").description("A Tool for Enhance VitePress Experience\r\n一个增强VitePress体验的工具").helpOption("-h, --help","Display help for command\r\n显示命令的帮助").version(f.version,"-v,-V, --version","Output current version information\r\n输出当前版本信息"),d.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;u.start("Installing..."),n("npm init -y"),n(`npm install @huyikai/vitepress-helper@${p}`,{stdio:"inherit"});const m=r.join(c,"node_modules/@huyikai/vitepress-helper/template"),d=r.join(c,"");i.copySync(m,d),(()=>{const e=r.join(c,"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"]=`^${p}`,n.devDependencies["@huyikai/local-cms"]=a?"latest":void 0,i.writeFileSync(e,JSON.stringify(n,null,2))})(),n("npm i",{stdio:"inherit"}),u.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}]}]))})),d.usage("<command> [option]"),d.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})))})),d.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="0.0.26",c=process.cwd(),u=t();const d=new e,h=r.dirname(a(import.meta.url)),y=r.join(h,"./../../package.json"),f=JSON.parse(i.readFileSync(y,"utf8"));d.name("VitePress-Helper").description("A Tool for Enhance VitePress Experience\r\n一个增强VitePress体验的工具").helpOption("-h, --help","Display help for command\r\n显示命令的帮助").version(f.version,"-v,-V, --version","Output current version information\r\n输出当前版本信息"),d.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;u.start("Installing..."),n("npm init -y"),n(`npm install @huyikai/vitepress-helper@${p}`,{stdio:"inherit"});const m=r.join(c,"node_modules/@huyikai/vitepress-helper/template"),d=r.join(c,"");i.copySync(m,d),(()=>{const e=r.join(c,"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"]=`^${p}`,n.devDependencies["@huyikai/local-cms"]=a?"latest":void 0,i.writeFileSync(e,JSON.stringify(n,null,2))})(),n("npm i",{stdio:"inherit"}),u.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}]}]))})),d.usage("<command> [option]"),d.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})))})),d.parse(process.argv);
//# sourceMappingURL=index.js.map

@@ -1,1 +0,11 @@

export declare const sortArray: (array: [], field: string) => [];
export declare const transformPagesArray: (pages: Array<any>, directory: String) => any[];
export declare const generateTree: (data: any) => any;
interface Params {
pages: Array<any>;
directory: String;
transformItem: Function;
}
export declare const buildSubTree: (params: Params) => any;
export declare const sortArray: (array: Array<any>, field?: string) => any[];
export declare const deduplicationArray: (array: Array<any>, unikey?: string) => any[];
export {};
{
"name": "@huyikai/vitepress-helper",
"version": "0.0.26",
"version": "0.0.27",
"private": false,

@@ -5,0 +5,0 @@ "description": "This tool is designed to help you to use VitePress more easily.",

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