-
Notifications
You must be signed in to change notification settings - Fork 55
/
Uno.Wasm.Bootstrap.Publish.targets
28 lines (23 loc) · 1.28 KB
/
Uno.Wasm.Bootstrap.Publish.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?xml version="1.0" encoding="utf-8" ?>
<Project>
<Target Name="_UnoWasmGetCopyToPublishDirectory"
BeforeTargets="GetCopyToPublishDirectoryItems"
Condition="'$(OutputType.ToLowerInvariant())'=='exe'">
<ItemGroup>
<!-- Don't want to publish the assemblies from the regular 'bin' dir. Instead we publish ones from 'dist'. -->
<ResolvedAssembliesToPublish Remove="@(ResolvedAssembliesToPublish)" />
<!-- Move wwwroot files to output root -->
<ContentWithTargetPath Update="@(ContentWithTargetPath)" Condition="$([System.String]::Copy('%(TargetPath)').StartsWith('wwwroot$([System.IO.Path]::DirectorySeparatorChar)'))">
<TargetPath>$([System.String]::Copy(%(TargetPath)).Substring(8))</TargetPath>
</ContentWithTargetPath>
<_UnoWasmDistFiles Include="$(OutputPath)dist\**"/>
<_UnoWasmDist Include="@(_UnoWasmDistFiles)">
<TargetPath>$([System.String]::Copy('%(Identity)').Replace('$(OutputPath)dist$([System.IO.Path]::DirectorySeparatorChar)', ''))</TargetPath>
</_UnoWasmDist>
<ContentWithTargetPath Include="@(_UnoWasmDist)">
<TargetPath>%(TargetPath)</TargetPath>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</ContentWithTargetPath>
</ItemGroup>
</Target>
</Project>