Commit Graph

287 Commits

Author SHA1 Message Date
Ryan Nowak ffadeecb45 Remove old <c:Foo> syntax 2018-03-14 11:23:42 +00:00
Ryan Nowak d175b4d38a Konvert to KoreBuild 2018-03-14 11:23:42 +00:00
Ryan Nowak 0c162e8c5a Allow non-property attributes to be set
This removes a limitation that prevented callers from passing
attributes to a component that aren't backed by properties.

The majority of the complication here is required to deal with the more
sophisticated way that HTML attributes are represented in the Razor IR.
2018-03-14 11:23:42 +00:00
Ryan Nowak c05657c7f2 Add support general delegate types
This builds upon existing support for UIEventHandler-typed component
properties and applies the same principle to any delegate type.

We try to help by generating the LSH of the lambda `=>` allowing you to
write `OnClick="Foo()"` rather than `OnClick="(e) => Foo()"`. You can of
course use @ as an escape.

The only rough edge here is that if the parameter names aren't memorable
for the delgate type, it's not super helpful.
2018-03-14 11:23:42 +00:00
Steve Sanderson d1cfe0191a Update templates to Blazor 0.1.0-preview1-10071 again, now the CI builds
are running again
2018-03-14 11:23:42 +00:00
Steve Sanderson 9027f82928 Revert "Update templates to Blazor 0.1.0-preview1-10071"
This reverts commit b448a5d096a27de5c8e700e43a264673de16b632.

This is because CI is currently unable to complete the signing process
so we can't upload that particular build.
2018-03-14 11:23:42 +00:00
Steve Sanderson 13719a60ea Update templates to Blazor 0.1.0-preview1-10071 2018-03-14 11:23:41 +00:00
Steve Sanderson 0c736300d5 Update BlazorHosted template content to new APIs 2018-03-14 11:23:41 +00:00
Steve Sanderson 9f34048633 Update BlazorStandalone template content to new APIs 2018-03-14 11:23:41 +00:00
Steve Sanderson 2d2b1d335e Update templates to Blazor 0.1.0-preview1-10069 2018-03-14 11:23:41 +00:00
Ryan Nowak 601e7914f7 Implement components as tag helpers
Implements Component code generation and tooling support end to end
udditionally adds some default `@addTagHelper` directives to make
programming in Blazor a little nicer.

Components are discovered as Tag Helpers using Razor's extensibility
during the build/IDE process. This drives the code generation during
build and lights up a bunch of editor features.

Add
2018-03-14 11:23:41 +00:00
Ryan Nowak b47e3095ee Add Razor SDK and packages to templates 2018-03-14 11:23:41 +00:00
Ryan Nowak adf4674955 Fix clean builds
This got out of date with my other changes
2018-03-14 11:23:40 +00:00
Ryan Nowak 211561a6a6 Implement 2-phase compilation
This is a working (all tests passing) implementation of the two-phase
compilation system we will need for component discovery.

This builds on top of work we've doing in Razor, including the Razor
SDK, MSBuild tasks, and CLI/server.

This currently *does* discovery components during the build process, but
it doesn't use that data for anything yet.

It works like this:
1. Generate class declarations (structure only, no method bodies)
2. Compile a 'temp' assembly using the .cs files and output of 1.
3. Do component discovery using the 'temp' assembly
4. Generate class definitions (including method bodies)
5. Compile the 'real' assembly using the .cs files and output of 4.
2018-03-14 11:23:40 +00:00
Ryan Nowak 6182e8448d Get rid of RazorCompiler
Adds a little more use of Razor extensibility.

Razor is a plugin model, so we can't be the 'first mover' for initiating
compilation in the build tools and IDE.

Reorganizes tests and fills out more reusable test infrastructure for
Razor-driven testing.

Adds tests for declaration-only configuration.
2018-03-14 11:23:40 +00:00
Ryan Nowak daf6a404f9 Implement basic Component discovery
This is the basics of component discovery along with some tests.

The next set of changes will integrate it into the compilation process.
2018-03-14 11:23:40 +00:00
Ryan Nowak a053155ab4 Implement layout and implements with directives
- Remove haxxxx
- Add proper directives with tooling support
2018-03-14 11:23:40 +00:00
Ryan Nowak 57a04fb178 Adopt more of Razor Exensibility
Removes some workarounds and uses Razor extensibility in a few more
places.

_ViewImports now works in VS
2018-03-14 11:23:40 +00:00
Steve Sanderson a386444b64 Make GetPropertiesIncludingInherited private to its consuming class
Just because it's not being used anywhere else currently
2018-03-13 11:54:50 +00:00
Florian Dohrendorf ef1b670b8b fix #216 2018-03-13 01:03:26 +01:00
forest93 53ab54d7b1 Fix #225. 2018-03-09 20:24:23 +08:00
Daniel Roth 969b8b86a6 Make templates show up in the One ASP.NET dialog (#208)
* Add templates parameter

* Fix primary outputs

* Reorder primary outputs

* Update hosted template name

* Fix whitespace
2018-03-05 23:56:11 +00:00
Steve Sanderson 493992ad04 Update templates to Blazor 0.0.5-preview1-10054 and use new GetJsonAsync<T> API 2018-03-05 14:38:21 -08:00
Steve Sanderson a74124efbf Add extension methods for HTTP JSON requests/responses 2018-03-05 02:02:26 +00:00
Steve Sanderson 0301250c4b In SimpleJson, support enum values serialized as numbers.
Note: still doesn't support nullable enum types.
2018-03-05 02:02:26 +00:00
Steve Sanderson 61e07eb615 Support @bind for enum and DateTime values (with optional format string) 2018-03-05 02:02:26 +00:00
Steve Sanderson 3ef78dcb7b Stop treating RenderFragment as immutable, because its output isn't 2018-03-05 02:02:26 +00:00
Alex Gavrilov 7afdccc53b Changing target framework to netstandard20 (not net461 on the CI machine) 2018-03-02 12:39:29 -08:00
Alex Gavrilov 1c15be550f VSIX Changes to have Blazor templates included into VSIX and show up in One ASP.NET Dialog 2018-03-01 20:08:34 -08:00
Steve Sanderson dc1b494df0 Update templates to Blazor 0.0.5-preview1-10041 2018-02-28 17:42:02 +00:00
Steve Sanderson 649159e31d Use real BCL System.Net.Http.HttpClient. Implements #159 2018-02-28 17:37:42 +00:00
Steve Sanderson dd831b4552 In "fetch", don't pass a "body" value if there isn't one 2018-02-28 17:37:42 +00:00
Steve Sanderson 1d07783522 Use "application/wasm" media type for .wasm files to enable streaming compilation 2018-02-28 17:37:42 +00:00
Steve Sanderson e3b995b933 Recompile Mono, updating MonoPlatform.ts to work with the newer version 2018-02-28 17:37:42 +00:00
Steve Sanderson f3b10bfa4c Template updates (#185)
* Remove unnecessary <OutputType>Exe</OutputType> from templates

* Rename BlazorHosted.* projects to BlazorHosted.CSharp.(Client|Server)

* Add empty BlazorHosted.CSharp.Shared, referenced from the two other BlazorHosted.CSharp.* projects

* Have BlazorHosted.CSharp.Client fetch data from BlazorHosted.CSharp.Server

* Update templates to Blazor 0.0.5-preview1-10037

* Make date handling consistent across the templates

* Enable response compression in "hosted" template

* Enable response compression in dev server

* Simplify template app code using new namespace arrangement

* Fix project name in hosted template
2018-02-28 12:02:35 +00:00
Steve Sanderson 4bd3cd98d6 Simplify apps by moving some commonly used types into Microsoft.AspNetCore.Blazor namespace 2018-02-28 11:29:14 +00:00
Steve Sanderson 1d5dfc2fbd In SimpleJson, support parsing Json.NET-serialized DateTimes 2018-02-28 10:28:57 +00:00
Steve Sanderson 04a69ed618 For "hosted" template, run "dotnet restore" on solution after project creation 2018-02-27 22:39:48 +00:00
Steve Sanderson f14c72bd9d Stop transitive dependency on Microsoft.AspNetCore.Blazor causing regular MVC view compilation error. Fixes #180 2018-02-27 22:23:48 +00:00
Steve Sanderson b96b78410c Minor improvements to "hosted" project template (e.g., "dotnet restore" post-action) 2018-02-27 21:57:03 +00:00
Steve Sanderson d0a05ff5db Update templates to Blazor 0.0.5-preview1-10031 2018-02-27 21:40:24 +00:00
Steve Sanderson 89ebeda38c Add multi-project template "BlazorHosted" 2018-02-27 21:40:24 +00:00
Steve Sanderson 39153955d6 Add "dotnet new" template BlazorStandalone.CSharp 2018-02-27 21:40:24 +00:00
Steve Sanderson 9a17a343cc Ensure Microsoft.AspNetCore.Blazor.Build is packed in a post-publish form so it's cross-plat compatible 2018-02-27 20:22:19 +00:00
Steve Sanderson de2bfe5162 Fix regression in app startup when running in E2E tests 2018-02-27 16:57:07 +00:00
Steve Sanderson ff5b6a7f30 Fix to "hosted in ASP.NET" startup logic when consuming via package references not project references 2018-02-27 16:38:15 +00:00
Steve Sanderson 2fc2a23d41 Include *.html in UpToDateCheckInput 2018-02-27 14:28:20 +00:00
Steve Sanderson 3e5381c17e Rename .DevHost project to .Cli, and make it work as a DotNetCliTool 2018-02-27 12:17:35 +00:00
Steve Sanderson 9d21eda9c4 Include "serve" command in dotnet-blazor tool 2018-02-26 17:37:00 +00:00
Steve Sanderson c255e77ab5 Remove redundant entry in NuSpec file 2018-02-26 17:05:45 +00:00