feat: setup interop

This commit is contained in:
TrèsAbhi committed 2026-01-25 21:27:24 -06:00
1 parent 7f5b5b614f
commit c1f765d5f7
8 files changed
+44 -36

No files matched your search

+11 -2
View File
@@ -1,3 +1,12 @@
namespace Game;
using Microsoft.JavaScript.NodeApi;
public class Class1 { }
namespace Game;
[JSExport]
public class Class1
{
public static void Test()
{
Console.WriteLine("lmao");
}
}
+6
View File
@@ -3,5 +3,11 @@
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<NodeApiAssemblyJSModuleType>esm</NodeApiAssemblyJSModuleType>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.JavaScript.NodeApi" Version="0.9.19" />
<PackageReference Include="Microsoft.JavaScript.NodeApi.Generator" Version="0.9.19" />
</ItemGroup>
</Project>
+9
View File
@@ -0,0 +1,9 @@
{
"name": "@blitzkit/game",
"private": true,
"type": "module",
"main": "src/index.ts",
"dependencies": {
"node-api-dotnet": "^0.9.19"
}
}
+3
View File
@@ -0,0 +1,3 @@
console.log("that's crazy yo");
export * from "../bin/Debug/net9.0/game";