Skip to content

Allow cli pass siteConfig to @vuepress/core #2195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
xqin opened this issue Feb 21, 2020 · 0 comments
Open

Allow cli pass siteConfig to @vuepress/core #2195

xqin opened this issue Feb 21, 2020 · 0 comments
Labels
status: core team review Priority issues for the core team to review type: feature request Request to add a new feature

Comments

@xqin
Copy link

xqin commented Feb 21, 2020

Feature request

@vuepress/core can receive siteConfig parameters, but cli does not declare this command line parameter.

@vuepress/core 模块支持接收一个 siteConfig 参数, 以方便在进行某些测试时, 免除非要在本地创建一个配置文件的烦恼, 但 cli 目前并没有声明这个参数, 导致在命令行中使用时, 无法享受这个便利的功能.

i have been test on local, just modify lib/registerCoreCommands.js, add one line code.

我已经在本地进行过测试, 只需要修改 lib/registerCoreCommands.js 这个文件, 在里面增加一个参数声明即可, 下图为运行效果.

image

According to this example, we can easily pass an object to cli

https://github.com/cacjs/cac#dot-nested-options

image

relative issue:

有相关性质的issue

#1955

It’s useful when you’re writing tests and don’t want to depend on actual config file.

https://vuepress.vuejs.org/api/node.html#siteconfig

@yyx990803

@xqin xqin changed the title Allow cli pass siteConfig to vuepress/core Allow cli pass siteConfig to @vuepress/core Feb 21, 2020
@billyyyyy3320 billyyyyy3320 added type: feature request Request to add a new feature status: core team review Priority issues for the core team to review labels Mar 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: core team review Priority issues for the core team to review type: feature request Request to add a new feature
Projects
None yet
Development

No branches or pull requests

2 participants