Skip to content

Commit

Permalink
Convert the hybrid webview from typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
mattleibow committed Jan 17, 2025
1 parent 1e26742 commit e125fd3
Show file tree
Hide file tree
Showing 8 changed files with 464 additions and 290 deletions.
3 changes: 3 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,7 @@
</ItemGroup>
</Target>

<!-- Tell typescript to stop deleting everything before building the next TFM -->
<Target Name="TypeScriptDeleteOutputFromOtherConfigs" />

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
<ItemGroup>
<EmbeddedResource Include="Resources\Embedded\*" />
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
<MauiAsset Include="..\..\..\Core\src\Handlers\HybridWebView\HybridWebView.js" LogicalName="HybridSamplePage\scripts\HybridWebView.js" />
<MauiImage Include="Resources\Images\*" />
<MauiImage Update="Resources\Images\*.gif" Resize="false" />
<MauiIcon Include="Resources\AppIcons\appicon.svg" ForegroundFile="Resources\AppIcons\appicon_foreground.svg" />
Expand Down

This file was deleted.

1 change: 1 addition & 0 deletions src/Controls/tests/DeviceTests/Controls.DeviceTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<!-- Raw Assets for HybridWebView tests (removes the "Resources\Raw" prefix, to mimic what project templates do) -->
<None Remove="Resources\Raw\**" />
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
<MauiAsset Include="..\..\..\Core\src\Handlers\HybridWebView\HybridWebView.js" LogicalName="HybridTestRoot\scripts\HybridWebView.js" />
</ItemGroup>

<PropertyGroup>
Expand Down

This file was deleted.

18 changes: 18 additions & 0 deletions src/Core/src/Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,24 @@
<None Include="nuget\buildTransitive\net-windows\**" PackagePath="buildTransitive\net$(_MauiMinimumSupportedDotNetTfm)-windows$(MinimumWindowsTargetFrameworkVersion)" Pack="true" />
</ItemGroup>

<!-- TypeScript compilation -->
<PropertyGroup>
<TypeScriptTarget>ES2020</TypeScriptTarget>
<TypeScriptSourceMap>false</TypeScriptSourceMap>
<TypeScriptNoImplicitAny>true</TypeScriptNoImplicitAny>
<TypeScriptCompileOnSaveEnabled>true</TypeScriptCompileOnSaveEnabled>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.TypeScript.MSBuild" Version="5.7.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<!-- TODO: embed the JS into the dll -->
<!-- <EmbeddedResource Include="Handlers\HybridWebView\HybridWebView.js" LogicalName="_framework/hybridwebview.js" /> -->
</ItemGroup>

<Target Name="_CopyToBuildTasksDir" AfterTargets="Build">
<ItemGroup>
<_CopyItems Include="nuget\buildTransitive\**" SubFolder="" Exclude="nuget\**\*.in.*;nuget\**\net-*\*" />
Expand Down
Loading

0 comments on commit e125fd3

Please sign in to comment.