Commit Graph

393 Commits

Author SHA1 Message Date
Javier Calvarro Nelson 04df5491c2 [Fixes #254] Microsoft.AspNetCore.Blazor.Build fails to build when referenced as a package. 2018-03-14 11:23:43 +00:00
Javier Calvarro Nelson 07d00442b1 Fix incremental builds 2018-03-14 11:23:43 +00:00
Steve Sanderson 0e9d52fe11 Support components and static content in external NuGet packages (#247)
* On build, drop <BlazorPackageContentFiles> items into dist\_content\(PackageName)\

* Add <script> and <link> tags to generated index.html

* Add testapp coverage of external content package. Still need to add E2E tests that uses it.

* Add missing unit test update

* Add example of packaging an entire Blazor component including CSS and images

* Add E2E test for component from NuGet package
2018-03-14 11:23:43 +00:00
Ryan Nowak 9549dccc54 Add @page directive
Adds the @page directive and support for specifying routes in components
at compile time.

For now the route is required and must begin with a leading /.
2018-03-14 11:23:43 +00:00
Javier Calvarro Nelson 700c2203c6 [Fixes #66] Adds linking support to the build
* Switch the tasks used to generate the blazor output to be MSBuild based.
* Package the optimized mono runtime and the BCL inside a nuget package.
* Add opt-in support for linking the application on build.
* Make the whole build process incremental.
2018-03-14 11:23:43 +00:00
Javier Calvarro Nelson f56fc1be3d Add feature/0.1.0 to the list of branches 2018-03-14 11:23:42 +00:00
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 49c0596405 Use real component syntax for NavLink/NavMenu 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 530404962f Update version numbers for BlazorExtension 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
Steve Sanderson 5a9d0f0b54 Update version in this branch to 0.1.0-preview1-* 2018-03-14 11:23:41 +00:00
Steve Sanderson c50f089269 Update BasicTestApp 2018-03-14 11:23:41 +00:00
Steve Sanderson a9cccccce5 Tweak HostedInAspNetClient.csproj for consistency 2018-03-14 11:23:41 +00:00
Steve Sanderson 85c515861c Update StandaloneApp 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
Steve Sanderson c0b0679e27 Add /p:TargetVSIXContainer to tools build script 2018-03-14 11:23:40 +00:00
Steve Sanderson d426809b4a Add /p:DeployExtension=false to tooling build script 2018-03-14 11:23:40 +00:00
Steve Sanderson ede0bdcdee Temporarily hardcode msbuild path in build script 2018-03-14 11:23:40 +00:00
Steve Sanderson bcf89371c6 Build BlazorTooling.sln too 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 2a2a045863 Ignore msbuild binary log files 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
Ryan Nowak 39c5aee9a1 Add other tooling assemblies to VSIX 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
Steve Sanderson 48ae58196d Add unit test to show JsonUtil handling IList<T> types 2018-03-12 10:52:59 +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
alexgav b48e073ebe Merge pull request #203 from aspnet/alexgav-vsixtemplates
VSIX Changes to have Blazor templates included into VSIX and show up …
2018-03-02 15:17:22 -08:00
Alex Gavrilov 7afdccc53b Changing target framework to netstandard20 (not net461 on the CI machine) 2018-03-02 12:39:29 -08:00
Florian Dohrendorf ab2abc442a add prerequisites for tooling usage 2018-03-02 07:39:00 -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