Closed dabanlee closed 5 years ago
{
"typedoc": "^0.14.2",
"typedoc-plugin-markdown": "^2.0.9"
}
@ozum I am happy to look at this unless you have any ideas?
@JustClear, could you please tell me where is .vuepress
directory located?
@JustClear, better yet, could you provide very minimal repo for this, because I cannot reproduce the issue.
@ozum https://github.com/JustClear/npmkit Thx here.
@tgreyuk , I confirm the issue in given repo.
I think problem is not related to --platform vuepress
. When I tracked, I see, line 132 in src/lib/output/renderer.ts
file of typedoc
library deletes every file in docs
directory (-- out docs
) including docs/.vuepress
with above command.
I put a throw new Error()
as below:
line 127-132 of src/lib/output/renderer.ts of typedoc
library
render(project: ProjectReflection, outputDirectory: string) {
if (!this.prepareTheme() || !this.prepareOutputDirectory(outputDirectory)) {
return;
}
const output = new RendererEvent(RendererEvent.BEGIN, outputDirectory, project);
throw new Error("docs directory is already emptied here...");
...
}
I didn't use --module modules
in my projects, and didn't see the issue described here. Just a guess, it could be related to --module modules
.
I don't have experience on typedoc
, so I could not follow further the issue. Could you have a look please?
Thanks,
@ozum thanks for looking at that. typedoc clears the output directory (however this can be skipped with disableOutputCheck
argument. Ideally the docs target would be in a separate location to the .vuepress dir but not too sure about vuepress config. I will need to look at the outputcheck as this should stop typedoc emptying directories that it shouldn't.
@JustClear, as @tgreyuk mentioned, it seems related to default TypeDoc behavior. Until (if possible) @tgreyuk solves the problem, I may suggest following workarounds for temporary solutions:
disableOutputCheck
.vuepress
output and configuration in separate directories..vuepress
directory (for example .vue-press-src
) and add this to your command or script: cp .vue-press-src docs/.vue-press
Hope helps,
Thanks a lot.
typedoc --module modules --theme markdown --platform vuepress --out docs src
Every time I run the command, theconfig.js
in folder.vuepress
deleted.