Commit Graph

67 Commits

Author SHA1 Message Date
Steve Sanderson 370edda02d Use separate filenames for the two different reference arg files 2018-05-01 10:15:21 +01:00
Marcus Bowyer e5d78f8886 Pass list of references via temp file for resolve-dependencies and build commands 2018-05-01 10:15:21 +01:00
Steve Sanderson 18b9a70dbe Encourage encapsulation of component parameter properties (#713)
* Before refactoring ParameterCollection assignment logic, add more test coverage

* Begin caching parameter assignment info

* Factor out some reflection code to a reusable location

* Use IPropertySetter to avoid all per-property-assignment reflection

* More error cases and tests for parameter assignment

* Enable binding to nonpublic properties

* Add analyzer to warn and provide fix for public component parameters

* Unit test for analyzer

* Component tag helper now includes private properties if they have [Parameter]

* CR feedback: Remove garbage from csproj

* CR feedback: Rename .Build.Analyzers to .Analyzers

* CR feedback: Move BlazorApi.cs to shared; use it from Analyzers test

* Fix incorrect test name

* Make as many parameters private as possible. Replace ILayoutComponent with BlazorLayoutComponent.

* In component tag helper discovery, consider private members too

* Reduce the work in component parameter discovery by not inspecting the BlazorComponent base class (or System.Object)
2018-05-01 10:08:01 +01:00
Steve Sanderson c8cc0145e0 Make Razor.Design a transitive dependency
By making Razor.Design a transitive dependency of Blazor.Build we can
avoid the need for users to care which version of Razor we depend upon,
and take it out of the templates.
2018-04-25 15:46:48 -04:00
Steve Sanderson 2f792cf53b Pass list of embedded resources candidate assemblies via temp file in intermediate dir. Fixes #554 2018-04-13 16:55:30 +01:00
Steve Sanderson 2f4e60b134 Set 'NoRestartServerOnBuild' by default. This means we can re-enable IISExpress when we think people are all on VS15.7Pre3 or later 2018-04-12 12:12:09 +01:00
Ryan Nowak 846d377b2c Update version numbers to 0.2 in preparation for 0.2 2018-04-11 11:10:17 -07:00
Steve Sanderson 3d787d7988 Auto rebuild when reloading after a file change. 2018-04-11 10:51:44 +01:00
Steve Sanderson fef5a52183 Reference static content from referenced assemblies. Implements #340 2018-04-06 09:50:10 +01:00
Steve Sanderson d3dc294d5e Revert live reloading implementation. See PR for explanation. 2018-04-04 18:10:12 +01:00
Steve Sanderson 6f7c188a76 Revert the attempt to share signal file path between MSBuild and VS extension code, because it doesn't get populated at the right time 2018-04-04 12:26:51 +01:00
Steve Sanderson 71a3e31799 Trigger live reload feature after successful builds in VS 2018-04-04 11:29:59 +01:00
Steve Sanderson 2c268a4eca Live reloading (currently enabled only for command-line builds - will
add VS support next)
2018-04-02 15:33:00 +01:00
Ryan Nowak d7d0c617ce Add a Blazor project capability 2018-03-27 19:21:48 -07:00
Javier Calvarro Nelson a1ba0ab8ea [Fixes #355] Generated index.html not regenerating when source Index.html changes (#375) 2018-03-25 18:36:27 -07:00
Steve Sanderson b3619f3e10 Fix serving of woff/woff2 files for standalone-published apps on IIS/Azure 2018-03-22 10:15:55 +00:00
Steve Sanderson fb3beab270 Link on build by default for all configurations, not only Release 2018-03-21 15:58:49 +00:00
Steve Sanderson 992c873019 For standalone publishing, add configure MIME type for .json
As per
https://blogs.msdn.microsoft.com/africaapps/2013/06/07/how-to-serve-static-json-files-from-a-windows-azure-website/
2018-03-21 12:33:59 +00:00
Steve Sanderson cf237707f9 Log info message if IL linking is disabled. Fixes #302 2018-03-20 22:28:43 +00:00
Steve Sanderson 4a8dc5c4a6 Add missing quotes to illink command. Fixes #301. 2018-03-20 19:42:25 +00:00
Steve Sanderson 0cfb25e2ad Enable Razor build server by default 2018-03-16 12:49:59 +00:00
Steve Sanderson 03ac95f086 A better fix for the VS publishing hosted projects issue (#274) 2018-03-16 09:13:48 +00:00
Pranav K b0d4e43a75 Make things build with preview1 SDK without warnings 2018-03-15 13:28:02 +00:00
Steve Sanderson 2176aa8c87 Stop IL linker from stripping System.Threading.WasmRuntime. Fixes #239 2018-03-15 09:26:53 +00:00
Steve Sanderson f7830e7b77 Publishing support 2018-03-14 11:23:43 +00:00
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
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
Ryan Nowak d175b4d38a Konvert to KoreBuild 2018-03-14 11:23:42 +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 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 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 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 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
Steve Sanderson 44a2603720 Have the Build package include all its own dependencies (otherwise the DotNetCliTool won't work) 2018-02-26 16:34:57 +00:00
Steve Sanderson 2f9515785e Fixes for Microsoft.AspNetCore.Blazor.Build package layout 2018-02-26 16:22:06 +00:00
Ryan Nowak dfe576f4fa Add new Razor bits
- Adds the aspnetcore-dev feed as a package source
- Updates Razor to a relatively new build
- Fixes a few issues encountered with new bits
2018-02-22 08:48:32 -08:00
Steve Sanderson 0665d30e19 In RazorCompiler, reject malformed documents with mismatching tags 2018-02-22 11:07:03 +00:00
Steve Sanderson 58af3e1638 Allow blazor-boot script to be served from apps not hosted at domain root 2018-02-21 10:22:03 +00:00
Steve Sanderson 608da4c78b Specifying entrypoint: Add tests and other stylistic tweaks 2018-02-19 14:22:03 +00:00
Eugene Bekker 1653e56b98 Adding ability to qualify the entry point of the main assembly 2018-02-19 14:11:25 +00:00
Steve Sanderson f649de2976 Support _ViewImports.cshtml files hierarchically 2018-02-18 23:57:20 +00:00
Steve Sanderson 69498f68f9 Add LayoutDisplay component and use it in StandaloneApp 2018-02-16 15:04:57 +00:00
Steve Sanderson b529f2b913 Avoid confusion with client apps not rebuilding after changing Blazor library code 2018-02-15 16:45:30 +00:00