piral-blazor
Advanced tools
Comparing version 1.0.0-pre.1779 to 1.0.0-pre.1801
{ | ||
"name": "piral-blazor", | ||
"version": "1.0.0-pre.1779", | ||
"version": "1.0.0-pre.1801", | ||
"description": "Plugin for integrating Blazor components in Piral.", | ||
@@ -51,3 +51,3 @@ "keywords": [ | ||
"@types/emscripten": "0.0.34", | ||
"piral-core": "^1.0.0-pre.1779" | ||
"piral-core": "^1.0.0-pre.1801" | ||
}, | ||
@@ -57,3 +57,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "a0580aa5ef2345a2091295bff1244676cd4e1f5a" | ||
"gitHead": "604a67a88d7e6e9afc2078b3bacf7306d0ff886f" | ||
} |
@@ -7,4 +7,10 @@ [![Piral Logo](https://github.com/smapiot/piral/raw/master/docs/assets/logo.png)](https://piral.io) | ||
The set includes a Blazor loader and converter for any component registration, as well as a `fromBlazor` shortcut together with some Blazor component coming in the `Piral.Blazor.Utils` NuGet package. | ||
The set includes a Blazor (WASM) loader and converter for any component registration, as well as a `fromBlazor` shortcut together with some Blazor component coming in the `Piral.Blazor.Utils` NuGet package. | ||
::: warning: Only for Blazor WASM | ||
The Blazor integration is for the client-side framework Blazor, also known as Blazor WASM. | ||
If you want to use Blazor Server we recommend using one of the ways of including a server-side rendered application as a pilet. More infos can be found at [in our migration tutorial for SSR applications](https://docs.piral.io/guidelines/tutorials/19-migrate-ssr). | ||
::: | ||
By default, these API extensions are not integrated in `piral`, so you'd need to add them to your Piral instance. | ||
@@ -16,4 +22,3 @@ | ||
**Important**: | ||
We recommend building pilets for `piral-blazor` exclusively with the official template. | ||
**Important**: We recommend building pilets for `piral-blazor` exclusively with the official template. | ||
@@ -56,5 +61,22 @@ The template can be installed using the `dotnet` CLI: | ||
} | ||
``` | ||
## Architecture | ||
Blazor with Piral works from two sides. We have the app shell's side and the side of the microfrontends. This package allows to connect both sides, by placing a set of shared functionality in the app shell. | ||
![Architecture Diagram](https://raw.githubusercontent.com/smapiot/piral/documentation/docs/diagrams/blazor-architecture.png) | ||
The diagram has the following pieces: | ||
1. Your app shell using `piral`, which needs to reference the `piral-blazor` plugin. Effectively, this will download and use the `Piral.Blazor.Core` NuGet package at build-time to include the common libraries. | ||
2. The TypeScript file in your Blazor pilets. That file will export the `setup` function to define which Blazor components to register / use in your app shell. | ||
3. The Blazor code in your Blazor pilets using the shared library `Piral.Blazor.Utils` for some convenience functions. This code will define all the Blazor components that can be registered / used in the pilet. | ||
Naturally, you can add other dependencies to your Blazor pilet, too. These can be other npm packages for extending the JS part. Usually, however, you will add more NuGet packages to enhance your Blazor code. | ||
This [Munich .NET Meetup video recording](https://www.youtube.com/watch?v=IGVQoCzCtR4) gives you a lot of details on the used architecture. | ||
## API | ||
The following functions are brought to the Pilet API. | ||
@@ -61,0 +83,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
400203
163