Begin on Microsoft.Blazor.Browser (TS portion of runtime)

This commit is contained in:
Steve Sanderson 2017-12-06 22:38:26 +00:00
parent 3ca7aa853e
commit 3688d12ab7
8 changed files with 2321 additions and 0 deletions

View File

@ -47,6 +47,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Blazor.E2ETest",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MonoSanityClient", "samples\MonoSanityClient\MonoSanityClient.csproj", "{06AAAE9E-96DE-4574-97DA-9C4C7D9FE990}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Blazor.Browser", "src\Microsoft.Blazor.Browser\Microsoft.Blazor.Browser.csproj", "{58D2DF2E-4181-4B16-9C69-A3F3EDB89B28}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -81,6 +83,10 @@ Global
{06AAAE9E-96DE-4574-97DA-9C4C7D9FE990}.Debug|Any CPU.Build.0 = Debug|Any CPU
{06AAAE9E-96DE-4574-97DA-9C4C7D9FE990}.Release|Any CPU.ActiveCfg = Release|Any CPU
{06AAAE9E-96DE-4574-97DA-9C4C7D9FE990}.Release|Any CPU.Build.0 = Release|Any CPU
{58D2DF2E-4181-4B16-9C69-A3F3EDB89B28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{58D2DF2E-4181-4B16-9C69-A3F3EDB89B28}.Debug|Any CPU.Build.0 = Debug|Any CPU
{58D2DF2E-4181-4B16-9C69-A3F3EDB89B28}.Release|Any CPU.ActiveCfg = Release|Any CPU
{58D2DF2E-4181-4B16-9C69-A3F3EDB89B28}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -94,6 +100,7 @@ Global
{118484D3-3993-45CE-97C1-6F28A517529B} = {ADA3AE29-F6DE-49F6-8C7C-B321508CAE8E}
{5BC2A10D-B6CA-43AE-B73C-2A41AE1039F9} = {ADA3AE29-F6DE-49F6-8C7C-B321508CAE8E}
{06AAAE9E-96DE-4574-97DA-9C4C7D9FE990} = {F5FDD4E5-6A52-4A86-BE5E-5E42CB1DC8DA}
{58D2DF2E-4181-4B16-9C69-A3F3EDB89B28} = {B867E038-B3CE-43E3-9292-61568C46CDEB}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {504DA352-6788-4DC0-8705-82167E72A4D3}

View File

@ -0,0 +1,2 @@
node_modules/
dist/

View File

@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
<DefaultItemExcludes>${DefaultItemExcludes};node_modules\**</DefaultItemExcludes>
</PropertyGroup>
<Target Name="RunWebpack" BeforeTargets="PreBuildEvent">
<RemoveDir Directories="dist" />
<Exec Command="npm run build" WorkingDirectory="$(MSBuildThisFileDirectory)" />
<ItemGroup>
<EmbeddedResource Include="dist/blazor.js" LogicalName="blazor.js" />
</ItemGroup>
</Target>
</Project>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,16 @@
{
"name": "blazor.host.client",
"version": "0.0.1",
"description": "",
"main": "index.js",
"scripts": {
"build": "webpack",
"test": "echo \"Error: no test specified\" && exit 1"
},
"devDependencies": {
"@types/emscripten": "0.0.31",
"typescript": "^2.6.1",
"webpack": "^3.8.1",
"ts-loader": "^3.2.0"
}
}

View File

@ -0,0 +1,2 @@
const abc: string = "Hello";
alert(abc);

View File

@ -0,0 +1,14 @@
{
"compilerOptions": {
"noImplicitAny": false,
"noEmitOnError": true,
"removeComments": false,
"sourceMap": true,
"target": "es5",
"lib": ["es2015", "dom"]
},
"exclude": [
"node_modules",
"wwwroot"
]
}

View File

@ -0,0 +1,12 @@
const path = require('path');
const webpack = require('webpack');
module.exports = {
resolve: { extensions: ['.ts', '.js'] },
devtool: 'inline-source-map',
module: {
rules: [{ test: /\.ts?$/, loader: 'ts-loader' }]
},
entry: { 'blazor': './src/Boot.ts' },
output: { path: path.join(__dirname, '/dist'), filename: '[name].js' }
};