Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions src/docfx/docfx.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@
<None Include="../../THIRD-PARTY-NOTICES.TXT" CopyToOutputDirectory="PreserveNewest" PackageCopyToOutput="true" />
</ItemGroup>

<!-- Custom target to merge large docfx dependencies to TargetFramework independent folder.
By default, these files are packed to `tools/$(TargetFramework)/any/*`.
This target rewrite:
- templates to the `/templates` directory.
- .playwright to the `/tools/.playwright` directory.
<!-- Custom target to merge docfx templates to TargetFramework independent folder.
By default, docfx templates is packed to `tools/$(TargetFramework)/any/templates/*`.
This target rewrite PackagePath and template files are placed at `templates/*` directory.
-->
<Target Name="RewriteDocfxTemplateFiles" AfterTargets="PackTool">
<PropertyGroup>
Expand All @@ -27,16 +25,11 @@
<TfmSpecificPackageFile Update="@(TfmSpecificPackageFile)"
Condition="$([System.String]::new('%(TfmSpecificPackageFile.PackagePath)').StartsWith('tools/$(TargetFramework)/any/templates/'))"
PackagePath="$([System.String]::new('%(TfmSpecificPackageFile.PackagePath)').Replace('tools/$(TargetFramework)/any/',''))"/>
<TfmSpecificPackageFile Update="@(TfmSpecificPackageFile)"
Condition="$([System.String]::new('%(TfmSpecificPackageFile.PackagePath)').StartsWith('tools/$(TargetFramework)/any/.playwright/'))"
PackagePath="$([System.String]::new('%(TfmSpecificPackageFile.PackagePath)').Replace('$(TargetFramework)/any/',''))"/>
</ItemGroup>
<!-- If TargetFramework is not selected version. Remove template files from package. -->
<ItemGroup Condition="'$(TargetFramework)' != '$(DocfxTemplateSourceTargetFramework)'">
<TfmSpecificPackageFile Remove="@(TfmSpecificPackageFile)"
Condition="$([System.String]::new('%(TfmSpecificPackageFile.PackagePath)').StartsWith('tools/$(TargetFramework)/any/templates/'))"/>
<TfmSpecificPackageFile Remove="@(TfmSpecificPackageFile)"
Condition="$([System.String]::new('%(TfmSpecificPackageFile.PackagePath)').StartsWith('tools/$(TargetFramework)/any/.playwright/'))"/>
</ItemGroup>
</Target>

Expand Down