vuejs / vitepress

Vite & Vue powered static site generator.
https://vitepress.dev
MIT License
13.22k stars 2.13k forks source link

feat(cli): support custom npm scripts prefix #4271

Open Barbapapazes opened 1 month ago

Barbapapazes commented 1 month ago

Description

Hello 👋,

This PR is the follow-up of #4270. I've added two options to allow developers to customize the prefix of scripts added to package.json.

Actually, if you want to create a blogs, portfolios, and marketing sites, or any sites that use VitePress but not for documentation, you have to manually change the prefix of the scripts added to package.json after running vitepress init.

Linked Issues

Additional Context

I'm building a tutorial on how to create a blog with VitePress and Vue.js from scratch. I used a lot VitePress for documentation, and it was fine. But for blogs, portfolios, and marketing sites, as mentioned in the VitePress documentation, I think the CLI needs some adjustments to make it easier to use and less documentation's oriented.


[!TIP] The author of this PR can publish a preview release by commenting /publish below.