-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathDirectory.Build.targets
More file actions
36 lines (32 loc) · 1.82 KB
/
Directory.Build.targets
File metadata and controls
36 lines (32 loc) · 1.82 KB
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
29
30
31
32
33
34
35
36
<Project>
<!--
Local development workaround: When referencing MauiDevFlow.Blazor as a ProjectReference
(rather than a NuGet package), the .targets file in build/ is NOT auto-imported.
This Directory.Build.targets replicates what the NuGet .targets does: it copies
chobitsu.js into the consuming app's wwwroot/js/ directory at build time so the
Razor SDK's static web asset pipeline picks it up for all platforms (iOS, Mac, Android).
NuGet consumers don't need this — the packaged Redth.MauiDevFlow.Blazor.targets handles it.
-->
<PropertyGroup>
<_ChobitsuJsSource>$(MSBuildThisFileDirectory)src\MauiDevFlow.Blazor\content\wwwroot\js\chobitsu.js</_ChobitsuJsSource>
<_ChobitsuJsDest>$(MSBuildProjectDirectory)\wwwroot\js\chobitsu.js</_ChobitsuJsDest>
</PropertyGroup>
<Target Name="_CopyChobitsuToWwwroot"
BeforeTargets="StaticWebAssetsPrepareForRun;Build"
Condition="'$(Configuration)' == 'Debug' AND '$(ApplicationId)' != '' AND Exists('$(_ChobitsuJsSource)')">
<MakeDir Directories="$(MSBuildProjectDirectory)\wwwroot\js" />
<Copy SourceFiles="$(_ChobitsuJsSource)"
DestinationFiles="$(_ChobitsuJsDest)"
SkipUnchangedFiles="true" />
</Target>
<Target Name="_CleanChobitsuFromWwwroot" AfterTargets="Clean"
Condition="Exists('$(_ChobitsuJsDest)')">
<Delete Files="$(_ChobitsuJsDest)" />
</Target>
<!--
Local development: Import Agent .targets for MauiDevFlowPort MSBuild property support.
NuGet consumers get this automatically from the package's build/ folder.
-->
<Import Project="$(MSBuildThisFileDirectory)src\MauiDevFlow.Agent\build\Redth.MauiDevFlow.Agent.targets"
Condition="'$(ApplicationId)' != '' AND Exists('$(MSBuildThisFileDirectory)src\MauiDevFlow.Agent\build\Redth.MauiDevFlow.Agent.targets')" />
</Project>