Commit Graph

80 Commits

Author SHA1 Message Date
Daniel Roth 5916d93118 Update survey links for 0.4.0 2018-06-01 09:17:12 -07:00
Ryan Nowak 5b40e3e121 Update versions to 2.1.0 (rtm) 2018-05-31 20:58:09 -07:00
Suchiman 0e5f9c2562 Use RestoreAdditionalProjectSources instead of RestoreSources
- The former is additive while the latter replaces the existing sources
2018-05-29 17:16:45 +01:00
Steve Sanderson 353da42cce Clean up use of relative URLs. Fixes #844 and #845 (#878)
* Handle links to empty-string href, resolved against base href

Needed to change the URLs used in E2E tests to be able to cover this (i.e., removed the /RouterTest prefixes so the default relative URL became an empty string)

* Change links in StandaloneApp sample to be relative

* Standardize on base URIs having trailing slash everywhere

Hence also change terminology from "base URI prefix" to simply "base URI"

* Handle link highlighting when visiting base-href-but-without-trailing-slash

* Removing leading slashes from base-relative URLs in templates
2018-05-24 09:54:43 +01:00
Steve Sanderson 9c567a0be4 Remove license notices from template output. Fixes #824 2018-05-23 11:12:48 +01:00
Ryan Nowak eeed731587 Update ASP.NET Core dependencies to RC 2018-05-22 11:10:15 -07:00
Steve Sanderson 866368192f Remove launchSettings.json from standalone template now we support
running on IISExpress by default

This reverts commit 84e6d259af314a9564521033d069dd30ac1fe8e8.
2018-05-22 13:02:59 +01:00
Steve Sanderson e33cb4a354 Simple autorebuild mechanism for hosted apps (#787)
* Simple autorebuild mechanism for hosted apps

* CR feedback: DI changes; use Directory.EnumerateFiles

* CR feedback: Ensure FileSystemWatcher isn't GCed
2018-05-22 13:02:36 +01:00
Steve Sanderson 37788f3c9d In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751)
* In Blazor cshtml files, auto-import Microsoft.AspNetCore.Blazor and Microsoft.AspNetCore.Blazor.Components. Fixes #749

* Remove redundant @using directives from tests

* Update assertion in test

* Update all affected baselines
2018-05-05 17:55:08 +01:00
Steve Sanderson 20e43adac5 camelCase all the JSONs (#746)
* Add camelCase utility

* Use camelCase when JSON-serializing (but not for dictionary keys)

* Make JSON deserialization treat member names case-insensitively (but retain case on dictionary keys)

* Use camelCase in JSON in the samples and templates

* Reverse the order of the params for the camelcase test because it's weird otherwise

* CR feedback
2018-05-04 16:14:38 +01:00
Steve Sanderson b4e70e72a0 Disable autorebuild in hosted projects due to VS 15.7pre5+ issue 2018-05-02 18:34:16 +01:00
Daniel Roth 6a4e5726ac Update survey link 2018-05-01 09:55:11 -07:00
Steve Sanderson 20a7fe7c2e Add isMultiProjectTemplate to hosted template vs-2017.3.host.json. Fixes #332 2018-05-01 17:49:57 +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
Daniel Roth ec1b220b7d Fixup project templates to handle project names with dashes (#692)
Fixes #291
2018-04-30 21:27:22 -07:00
Ryan Nowak f661021324 Add [Parameter] for component parameters
This change introduces ParameterAttribute to specify a bindable
component parameter. As of the 0.3 release of Blazor we plan to make
[Parameter] required to make a property bindable by callers.

This also applies to parameters when their value is set by the
infrastructure, such as `Body` for layouts, and route paramters.

The rationale behind this change is that we think there is a need to
separate the definition of properties from their suitability for a
caller to set them through markup. We plan to introduce more features in
this area in the future such as marking parameters as required. This is
first step, and we think that this approach will scale nicely as we add
more functionaly.

The 0.3 release seems like the right time to change this behavior since
we're also introducing `ref` for captures in this release.
2018-04-30 13:35:08 -07:00
Emanuele Filardo 74b2b6b232 Set Program class as public in standalone project template 2018-04-26 23:25:13 +01:00
Ryan Nowak ed06d7b12e Rough cut at async events 2018-04-26 13:31:28 -07: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 6e85f4cb13 Replace 'nobr' with 'span.text-nowrap'. Fixes #652 2018-04-23 09:36:37 +01:00
Daniel Roth d0e09a066c Change blazorlib output type to Library 2018-04-19 16:06:32 -07:00
Steve Sanderson d02436d55c Bootstrap 4 and new styling (#619)
* Upgrade to bootstrap v4

Remove  redundant MIME type

* Add new styling to StandaloneApp

* Update THIRD-PARTY-NOTICES.txt

* Update version of Blazor used by templates when running from source

* Update styling on BlazorStandalone.CSharp template

* Tweak brace style

* Update styling in BlazorHosted.CSharp template

* Update E2E tests that rely on specific CSS

* Add Open Ionic fonts license to notices too
2018-04-19 21:06:28 +01:00
Steve Sanderson 03b8f2c99f Update templates' global.json files to require SDK 2.1.300-preview2-008533 2018-04-16 10:03:19 +01:00
Steve Sanderson ce8088f9a3 Inject MSBuild properties into templates during build 2018-04-13 16:50:33 +01:00
Steve Sanderson 50c4f4910f Update templates to Blazor 0.2.0-preview1-10195 2018-04-11 18:08:04 +01:00
Steve Sanderson fc4179efe6 Have server project template use Microsoft.AspNetCore.App preview 2 now we're requiring the newer .NET SDK 2018-04-11 18:08:04 +01:00
Steve Sanderson c9ecf46ed0 Change templates' global.json to specify SDK 2.1.300-preview2-008530 2018-04-11 18:08:04 +01:00
Steve Sanderson 39238d1884 Show templates in VS for ASP.NET 2.0 and 2.1 2018-04-11 18:08:04 +01:00
Ryan Nowak 6d3838ef9d [WIP] Update templates
This is work in progress right now. We'll need to update again once
there's a build with the Action fix in it, and again to point to the
final package versions.

Just getting things staged ahead of time.
2018-04-11 14:25:54 +01:00
Steve Sanderson e727cf2419 Rename "blazor content" project to "blazor library". Fixes #539 2018-04-11 14:26:29 +01:00
Luke Latham 945995199c Template/sample updates 2018-04-10 22:41:07 -07:00
Ryan Nowak ed2dbbd2f8 Update to preview2 release versions 2018-04-10 18:14:40 -07:00
Daniel Roth 08d5a15013 Update survey links for 0.2.0 2018-04-06 15:15:48 -07:00
Steve Sanderson fef5a52183 Reference static content from referenced assemblies. Implements #340 2018-04-06 09:50:10 +01:00
Daniel Roth 05059d9aa3 Rename configure parameter to services 2018-04-05 12:03:54 -07:00
Daniel Roth 907832524a Add DI extension method namespace to Program.cs in templates 2018-04-05 12:03:54 -07:00
Steve Sanderson 902625579b For better consistency between VS and CLI, specify resource sources in csproj rather than NuGet.config
This was not possible before because of the
`Microsoft.NET.Sdk.Razor/2.1.0-preview2-30230` entry in `Sdk`, which
can't be loaded from a custom restore source. But since that's on
NuGet.org now, it's no longer a problem.
2018-04-05 10:41:13 +01:00
Steve Sanderson 2d89c11183 Update templates to Blazor 0.2.0-preview1-10168 2018-04-04 14:08:06 +01:00
Steve Sanderson 049673db0d Update templates to Blazor 0.2.0-preview1-10165 2018-04-04 11:31:36 +01:00
Steve Sanderson 38cdb870f8 Update templates to Blazor 0.2.0-preview1-10152 2018-03-30 12:22:58 +01:00
Luke Latham 2a8d06b539 Double-quote attribute values? 2018-03-30 10:12:35 +01:00
Ryan Nowak f6479a75cb Remove workaround for old Razor tooling
This isn't needed anymore to support the Blazor design-time experience.

Now that it's gone, it will no longer cause conflicts with MVC's types
so we can remove the other workaround (privateassets).
2018-03-27 19:24:10 -07:00
Steve Sanderson 29a7d4e5bc In Hosted template, exclude .sln when generating from VS (to avoid duplication) 2018-03-22 19:39:12 +00:00
Steve Sanderson 3b5ce7f4a7 In templates, move survey content out into a separate component 2018-03-21 16:22:32 +00:00
Steve Sanderson 4d7670a979 Update templates to Blazor 0.1.0-rc1-10117 2018-03-20 22:37:30 +00:00
Steve Sanderson 3e4ba1a35f Add survey links to templates. Fixes #221 2018-03-20 22:27:29 +00:00
Steve Sanderson 678721cbad In hosted template, enable response compression for .wasm 2018-03-20 20:07:25 +00:00
Steve Sanderson 4eb78b3a8f Add global.json files to templates. Implements #300. 2018-03-20 19:45:43 +00:00
Steve Sanderson f703732e98 In templates, update _ViewImports/NavMenu to match updated APIs 2018-03-20 13:59:20 +00:00
Steve Sanderson aa43496d00 Update templates to Blazor 0.1.0-preview1-10112 2018-03-20 13:29:53 +00:00