Vuepress: Configurable `.vuepress` directory

Created on 13 Dec 2018  路  2Comments  路  Source: vuejs/vuepress


Feature request



What problem does this feature solve?

This has been raised before in vuejs/vuepress#105 and vuejs/vuepress#836, and both times they were knocked back, but I thought I'd ask again for this feature since I think I've encountered a scenario where it would make a lot of sense.

I'm using SonarQube to inspect my codebase, including inspecting my VuePress project.

SonarQube have made the assumption that any folder starting with a period is a hidden folder, which means the .vuepress folder and anything inside of it does not get inspected - not what I wanted!

If I could tell VuePress to look elsewhere for it's configuration, that would help solve the problem.
For now, I have to rename the .vuepress folder to vuepress so that SonarQube sees it. 馃槙

What does the proposed API look like?

A new command line option to configure the directory.

$ vuepress [dev/build] --help
...
  --config <config>  set the directory of vuepress config (default: .vuepress)
...

How should this be implemented in your opinion?

Instead of using a hard coded ".vuepress" everywhere, instead use the directory passed in on the command line after it's processed in AppContext.

If we default the command line option to ".vuepress", then the current behaviour will continue while then also allowing the configuration directory to be changed.

Are you willing to work on this yourself?**

Sure thing, just let me know if this is desirable/doable.

All 2 comments

I need to clarify, this is an agreement instead of a hard code.

Sorry but also NO. You can try to explore whether SonarQube supports to include dot file, and if not, we are also not going to changing it.

Why do you think adding an option would break this convention/agreement?

Was this page helpful?
0 / 5 - 0 ratings