Skip to content

Commit 758ca19

Browse files
authored
Build against the local JSInterop (#22526)
1 parent 4d36789 commit 758ca19

File tree

12 files changed

+24
-12
lines changed

12 files changed

+24
-12
lines changed

src/Components/Web.JS/Microsoft.AspNetCore.Components.Web.JS.npmproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212
</ItemGroup>
1313

1414
<ItemGroup>
15+
<ProjectReference
16+
Include="..\..\JSInterop\Microsoft.JSInterop.JS\src\Microsoft.JSInterop.JS.npmproj"
17+
ReferenceOutputAssemblies="false"
18+
SkipGetTargetFrameworkProperties="true"
19+
UndefineProperties="TargetFramework"
20+
Private="false" />
1521
<ProjectReference
1622
Include="..\..\SignalR\clients\ts\signalr\signalr.npmproj"
1723
ReferenceOutputAssemblies="false"

src/Components/Web.JS/dist/Release/blazor.server.js

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

src/Components/Web.JS/dist/Release/blazor.webassembly.js

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

src/Components/Web.JS/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"devDependencies": {
1717
"@microsoft/signalr": "link:../../SignalR/clients/ts/signalr",
1818
"@microsoft/signalr-protocol-msgpack": "link:../../SignalR/clients/ts/signalr-protocol-msgpack",
19-
"@microsoft/dotnet-js-interop": "https://dotnet.myget.org/F/aspnetcore-dev/npm/@microsoft/dotnet-js-interop/-/@microsoft/dotnet-js-interop-5.0.0-alpha1.19572.2.tgz",
19+
"@microsoft/dotnet-js-interop": "link:../../JSInterop/Microsoft.JSInterop.JS/src",
2020
"@types/emscripten": "^1.39.3",
2121
"@types/jest": "^24.9.1",
2222
"@types/jsdom": "11.0.6",

src/Components/Web.JS/src/Boot.Server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import '@microsoft/dotnet-js-interop';
1+
import { DotNet } from '@microsoft/dotnet-js-interop';
22
import './GlobalExports';
33
import * as signalR from '@microsoft/signalr';
44
import { MessagePackHubProtocol } from '@microsoft/signalr-protocol-msgpack';

src/Components/Web.JS/src/Boot.WebAssembly.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import '@microsoft/dotnet-js-interop';
1+
import { DotNet } from '@microsoft/dotnet-js-interop';
22
import './GlobalExports';
33
import * as Environment from './Environment';
44
import { monoPlatform } from './Platform/Mono/MonoPlatform';

src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { DotNet } from '@microsoft/dotnet-js-interop';
12
import { attachDebuggerHotkey, hasDebuggingEnabled } from './MonoDebugger';
23
import { showErrorNotification } from '../../BootErrors';
34
import { WebAssemblyResourceLoader, LoadingResource } from '../WebAssemblyResourceLoader';

src/Components/Web.JS/src/Rendering/ElementReferenceCapture.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { DotNet } from '@microsoft/dotnet-js-interop';
2+
13
export function applyCaptureIdToElement(element: Element, referenceCaptureId: string) {
24
element.setAttribute(getCaptureIdAttributeName(referenceCaptureId), '');
35
}

src/Components/Web.JS/yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,9 @@
345345
"@types/istanbul-reports" "^1.1.1"
346346
"@types/yargs" "^13.0.0"
347347

348-
"@microsoft/dotnet-js-interop@https://dotnet.myget.org/F/aspnetcore-dev/npm/@microsoft/dotnet-js-interop/-/@microsoft/dotnet-js-interop-5.0.0-alpha1.19572.2.tgz":
349-
version "5.0.0-alpha1.19572.2"
350-
resolved "https://dotnet.myget.org/F/aspnetcore-dev/npm/@microsoft/dotnet-js-interop/-/@microsoft/dotnet-js-interop-5.0.0-alpha1.19572.2.tgz#8abd8d315f2304ffa441d9fb42bd5a571969e9a0"
348+
"@microsoft/dotnet-js-interop@link:../../JSInterop/Microsoft.JSInterop.JS/src":
349+
version "0.0.0"
350+
uid ""
351351

352352
"@microsoft/signalr-protocol-msgpack@link:../../SignalR/clients/ts/signalr-protocol-msgpack":
353353
version "0.0.0"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
dist/

src/JSInterop/Microsoft.JSInterop.JS/src/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"main": "dist/Microsoft.JSInterop.js",
66
"types": "dist/Microsoft.JSInterop.d.ts",
77
"scripts": {
8+
"preclean": "yarn install",
89
"clean": "node node_modules/rimraf/bin.js ./dist",
910
"build": "npm run clean && npm run build:esm",
1011
"build:lint": "node node_modules/tslint/bin/tslint -p ./tsconfig.json",

src/JSInterop/Microsoft.JSInterop.JS/src/src/Microsoft.JSInterop.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This is a single-file self-contained module to avoid the need for a Webpack build
22

3-
module DotNet {
3+
export module DotNet {
44
(window as any).DotNet = DotNet; // Ensure reachable from anywhere
55

66
export type JsonReviver = ((key: any, value: any) => any);

0 commit comments

Comments
 (0)