4
솔루션에 여러 프로젝트가있는 프로젝트에서 작업하고 있습니다. 응용 프로그램 코드 폴더를 깨끗하게 유지하려면 외부 디렉터리에서 설명서를 생성 할 수 있어야합니다. 내 docfx.json에 src 디렉토리를 설정하려고하면 절대 경로가 좋아 보이지 않으며 상대 경로도 마음에 들지 않습니다.DocFX : 여러 프로젝트에 대한 API 문서 생성
{
"metadata":
[{
"src":
[{
"files": ["../../../Repos/Wsi.Extranet.CommonServices/Wsi.Extranet.CommonServices/**/*.csproj"]
"exclude":
[
"**/obj/**",
"**/bin/**",
"_site/**"
]
}],
"dest": "api"
}],
"build": {
"content": [
{
"files": [
"api/**.yml",
"api/index.md"
]
},
{
"files": [
"articles/**.md",
"articles/**/toc.yml",
"toc.yml",
"*.md"
],
"exclude": [
"obj/**",
"_site/**"
]
}
],
"resource": [
{
"files": [
"images/**"
],
"exclude": [
"obj/**",
"_site/**"
]
}
],
"overwrite": [
{
"files": [
"apidoc/**.md"
],
"exclude": [
"obj/**",
"_site/**"
]
}
],
"src": "../../../Repos/Wsi.Extranet.CommonServices/Wsi.Extranet.CommonServices",
"dest": "_site",
"globalMetadataFiles": [],
"fileMetadataFiles": [],
"template": [
"default"
],
"postProcessors": [],
"noLangKeyword": false
}
}
괜찮 았지만 파일을 찾지 못했지만 현재 디렉토리에 머무르고있는 디렉토리를 찾습니다.
D:\temp\WsiApiDocs\docfx_project>docfx metadata
Info: Config file docfx.json found, start generating metadata...
Info: No files are found with glob pattern
../../../Repos/Wsi.Extranet.CommonServices/Wsi.Extranet.CommonServices/**/*.csproj,
excluding **/obj/**,**/bin/**,_site/**, under directory
"D:\temp\WsiApiDocs\docfx_project"
**Warning: NOTE that `../` is currently not supported in glob pattern, please use `../` in `src` option instead.**
Info: Completed executing in 48.9621 milliseconds.
Build succeeded with warning.
Warning: NOTE that `../` is currently not supported in glob pattern, please use `../` in `src` option instead.
1 Warning(s)
0 Error(s)
그래서 내 혼란 대신 SRC 옵션을 사용하는 방법 것 같다 : 나는 파일 속성에 상대 경로를 넣어하려고하면
D:\temp\WsiApiDocs\docfx_project>docfx metadata
Info: Config file docfx.json found, start generating metadata...
Info: No files are found with glob pattern **/*.csproj, excluding
**/obj/**,**/bin/**,_site/**, under directory "D:\temp\WsiApiDocs\docfx_project"
Info: Completed executing in 54.0087 milliseconds.
Build succeeded.
0 Warning(s)
0 Error(s)
, 나는 다음과 같은 얻을. 메타 데이터에서 src를 사용하면 파일 및 제외 정보를 지정할 수없는 것으로 보입니다. 메타 데이터와 같은 수준에서 src 속성을 사용하려고했지만 아무 것도하지 않는 것처럼 보였습니다.
굉장 ... 감사 마커스를 구성하는 exmaple입니다! 왜 내가 더 힘들게 만들었는지 모르겠다. src를 통해 기본 디렉토리를 설정한다고 말했을 때, 부모 src 노드에 대해 이야기하고 있다고 생각했습니다. 부모 src 노드에 자식 src를두기 위해 내 마음에 들지도 않았습니다. 여러 프로젝트를 구성하는 데 도움이되는 링크도 있습니다. –