Skip to content

Commit eafaddb

Browse files
Copilotmattleibow
andcommitted
Use Microsoft.TypeScript.MSBuild matching upstream SkiaSharp; keep .js and .map in source control
- Replace custom Exec target with Microsoft.TypeScript.MSBuild 5.7.3 (PrivateAssets=all) - Move SKTouchInterop.ts from Scripts/ back to wwwroot/ (matching upstream convention) - Remove tsconfig.json; use TypeScript MSBuild properties in csproj instead - Enable source maps (TypeScriptSourceMap=True) - Remove .gitignore entry — .js and .js.map are now committed to source control - All 3 files (.ts, .js, .js.map) live side-by-side in wwwroot/ like upstream SkiaSharp Co-authored-by: mattleibow <1096616+mattleibow@users.noreply.github.com>
1 parent 433ca3e commit eafaddb

File tree

6 files changed

+11
-29
lines changed

6 files changed

+11
-29
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,3 @@ __pycache__/
289289
*.btm.cs
290290
*.odx.cs
291291
*.xsd.cs
292-
293-
# TypeScript build output (generated from Scripts/*.ts by Microsoft.TypeScript.MSBuild)
294-
source/SkiaSharp.Extended.UI.Blazor/wwwroot/*.js

source/SkiaSharp.Extended.UI.Blazor/SkiaSharp.Extended.UI.Blazor.csproj

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,15 @@
1616
<Description>This package adds a touch-enabled SkiaSharp canvas view for Blazor, providing unified touch/pointer event support across mouse, touch, and stylus inputs.</Description>
1717
</PropertyGroup>
1818

19+
<PropertyGroup>
20+
<TypeScriptTarget>es2015</TypeScriptTarget>
21+
<TypeScriptModuleKind>es2015</TypeScriptModuleKind>
22+
<TypeScriptNoImplicitAny>True</TypeScriptNoImplicitAny>
23+
<TypeScriptSourceMap>True</TypeScriptSourceMap>
24+
</PropertyGroup>
25+
1926
<ItemGroup>
27+
<PackageReference Include="Microsoft.TypeScript.MSBuild" Version="5.7.3" PrivateAssets="all" />
2028
<PackageReference Include="SkiaSharp" Version="3.119.1" />
2129
<PackageReference Include="SkiaSharp.Views.Blazor" Version="3.119.1" />
2230
</ItemGroup>
@@ -37,17 +45,4 @@
3745
<Using Include="SkiaSharp.Views.Blazor" />
3846
</ItemGroup>
3947

40-
<!-- TypeScript source lives in Scripts/ and is compiled to wwwroot/ -->
41-
<ItemGroup>
42-
<Content Remove="Scripts\**" />
43-
<None Include="Scripts\**\*.ts" />
44-
</ItemGroup>
45-
46-
<!-- Compile TypeScript before build; requires tsc (npm i -g typescript) -->
47-
<Target Name="CompileTypeScript" BeforeTargets="BeforeBuild"
48-
Inputs="@(None->WithMetadataValue('Extension', '.ts'))"
49-
Outputs="wwwroot/SKTouchInterop.js">
50-
<Exec Command="tsc -p tsconfig.json" WorkingDirectory="$(MSBuildProjectDirectory)" />
51-
</Target>
52-
5348
</Project>

source/SkiaSharp.Extended.UI.Blazor/tsconfig.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

source/SkiaSharp.Extended.UI.Blazor/wwwroot/SKTouchInterop.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/SkiaSharp.Extended.UI.Blazor/wwwroot/SKTouchInterop.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/SkiaSharp.Extended.UI.Blazor/Scripts/SKTouchInterop.ts renamed to source/SkiaSharp.Extended.UI.Blazor/wwwroot/SKTouchInterop.ts

File renamed without changes.

0 commit comments

Comments
 (0)