Skip to content

Build against the local JSInterop #22526

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
</ItemGroup>

<ItemGroup>
<ProjectReference
Include="..\..\JSInterop\Microsoft.JSInterop.JS\src\Microsoft.JSInterop.JS.npmproj"
ReferenceOutputAssemblies="false"
SkipGetTargetFrameworkProperties="true"
UndefineProperties="TargetFramework"
Private="false" />
<ProjectReference
Include="..\..\SignalR\clients\ts\signalr\signalr.npmproj"
ReferenceOutputAssemblies="false"
Expand Down
8 changes: 4 additions & 4 deletions src/Components/Web.JS/dist/Release/blazor.server.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Components/Web.JS/dist/Release/blazor.webassembly.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Components/Web.JS/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"devDependencies": {
"@microsoft/signalr": "link:../../SignalR/clients/ts/signalr",
"@microsoft/signalr-protocol-msgpack": "link:../../SignalR/clients/ts/signalr-protocol-msgpack",
"@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",
"@microsoft/dotnet-js-interop": "link:../../JSInterop/Microsoft.JSInterop.JS/src",
"@types/emscripten": "^1.39.3",
"@types/jest": "^24.9.1",
"@types/jsdom": "11.0.6",
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Web.JS/src/Boot.Server.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@microsoft/dotnet-js-interop';
import { DotNet } from '@microsoft/dotnet-js-interop';
import './GlobalExports';
import * as signalR from '@microsoft/signalr';
import { MessagePackHubProtocol } from '@microsoft/signalr-protocol-msgpack';
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Web.JS/src/Boot.WebAssembly.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@microsoft/dotnet-js-interop';
import { DotNet } from '@microsoft/dotnet-js-interop';
import './GlobalExports';
import * as Environment from './Environment';
import { monoPlatform } from './Platform/Mono/MonoPlatform';
Expand Down
1 change: 1 addition & 0 deletions src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { DotNet } from '@microsoft/dotnet-js-interop';
import { attachDebuggerHotkey, hasDebuggingEnabled } from './MonoDebugger';
import { showErrorNotification } from '../../BootErrors';
import { WebAssemblyResourceLoader, LoadingResource } from '../WebAssemblyResourceLoader';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { DotNet } from '@microsoft/dotnet-js-interop';

export function applyCaptureIdToElement(element: Element, referenceCaptureId: string) {
element.setAttribute(getCaptureIdAttributeName(referenceCaptureId), '');
}
Expand Down
6 changes: 3 additions & 3 deletions src/Components/Web.JS/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,9 @@
"@types/istanbul-reports" "^1.1.1"
"@types/yargs" "^13.0.0"

"@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":
version "5.0.0-alpha1.19572.2"
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"
"@microsoft/dotnet-js-interop@link:../../JSInterop/Microsoft.JSInterop.JS/src":
version "0.0.0"
uid ""

"@microsoft/signalr-protocol-msgpack@link:../../SignalR/clients/ts/signalr-protocol-msgpack":
version "0.0.0"
Expand Down
2 changes: 2 additions & 0 deletions src/JSInterop/Microsoft.JSInterop.JS/src/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
dist/
1 change: 1 addition & 0 deletions src/JSInterop/Microsoft.JSInterop.JS/src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "dist/Microsoft.JSInterop.js",
"types": "dist/Microsoft.JSInterop.d.ts",
"scripts": {
"preclean": "yarn install",
"clean": "node node_modules/rimraf/bin.js ./dist",
"build": "npm run clean && npm run build:esm",
"build:lint": "node node_modules/tslint/bin/tslint -p ./tsconfig.json",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This is a single-file self-contained module to avoid the need for a Webpack build

module DotNet {
export module DotNet {
(window as any).DotNet = DotNet; // Ensure reachable from anywhere

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