-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Demo for using a NuGet package (#48)
- Loading branch information
Showing
22 changed files
with
223 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<Project> | ||
<!-- Use Local NuGet package --> | ||
<ItemGroup Condition="$(BLLUseLocalNugetPackages)"> | ||
<PackageReference Include="BlazorLazyLoading.Components" Version="$(BLLVersion)" /> | ||
</ItemGroup> | ||
|
||
<!-- Use Project reference --> | ||
<ItemGroup Condition="!$(BLLUseLocalNugetPackages)"> | ||
<ProjectReference Include="$(MSBuildThisFileDirectory)..\nuget\BlazorLazyLoading.Components\BlazorLazyLoading.Components.csproj" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<Project> | ||
<!-- Use Local NuGet package --> | ||
<ItemGroup Condition="$(BLLUseLocalNugetPackages)"> | ||
<PackageReference Include="BlazorLazyLoading.Module" Version="$(BLLVersion)" PrivateAssets="all" /> | ||
</ItemGroup> | ||
|
||
<!-- Use Project reference --> | ||
<ItemGroup Condition="!$(BLLUseLocalNugetPackages)"> | ||
<ProjectReference Include="$(MSBuildThisFileDirectory)..\nuget\BlazorLazyLoading.Module\BlazorLazyLoading.Module.csproj" PrivateAssets="all" /> | ||
</ItemGroup> | ||
<Import Condition="!$(BLLUseLocalNugetPackages)" Project="$(MSBuildThisFileDirectory)..\nuget\BlazorLazyLoading.Module\build\BlazorLazyLoading.Module.props" /> | ||
<Import Condition="!$(BLLUseLocalNugetPackages)" Project="$(MSBuildThisFileDirectory)..\nuget\BlazorLazyLoading.Module\build\BlazorLazyLoading.Module.targets" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<Project> | ||
<!-- Use Local NuGet package --> | ||
<ItemGroup Condition="$(BLLUseLocalNugetPackages)"> | ||
<PackageReference Include="BlazorLazyLoading.Server" Version="$(BLLVersion)" PrivateAssets="all" /> | ||
</ItemGroup> | ||
|
||
<!-- Use Project reference --> | ||
<ItemGroup Condition="!$(BLLUseLocalNugetPackages)"> | ||
<ProjectReference Include="$(MSBuildThisFileDirectory)..\nuget\BlazorLazyLoading.Server\BlazorLazyLoading.Server.csproj" PrivateAssets="all" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<Project> | ||
<!-- Use Local NuGet package --> | ||
<ItemGroup Condition="$(BLLUseLocalNugetPackages)"> | ||
<PackageReference Include="BlazorLazyLoading.Wasm" Version="$(BLLVersion)" PrivateAssets="all" /> | ||
</ItemGroup> | ||
|
||
<!-- Use Project reference --> | ||
<ItemGroup Condition="!$(BLLUseLocalNugetPackages)"> | ||
<ProjectReference Include="$(MSBuildThisFileDirectory)..\nuget\BlazorLazyLoading.Wasm\BlazorLazyLoading.Wasm.csproj" PrivateAssets="all" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
demo/LazyAreas/LazyComponentFromNuget/LazyComponentFromNuget.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Razor"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.1</TargetFramework> | ||
<RazorLangVersion>3.0</RazorLangVersion> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.AspNetCore.Components" Version="3.1.2" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="3.1.2" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Faso.Blazor.SpinKit" Version="1.0.1" /> | ||
</ItemGroup> | ||
|
||
<Import Project="../../BlazorLazyLoading.Components.props" /> | ||
|
||
</Project> |
18 changes: 18 additions & 0 deletions
18
demo/LazyAreas/LazyComponentFromNuget/Pages/LazyComponentFromNuget.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
@page "/lazy-component-from-nuget" | ||
|
||
<h1>Lazy Component from NuGet</h1> | ||
<p> | ||
The following component is rendered from a nuget package (Faso.Blazor.SpinKit in this case). | ||
The nuget DLL will only be loaded when opening this page for the first time. Please check the network tab :) | ||
</p> | ||
|
||
@* | ||
Works fine out of the box | ||
*@ | ||
<Faso.Blazor.SpinKit.SpinKitWave /> | ||
|
||
@* | ||
Requires the Module to have: | ||
+ <BLLManifestAssemblies Include="Faso.Blazor.SpinKit" /> | ||
*@ | ||
@*<Lazy Name="Faso.Blazor.SpinKit.SpinKitWave" />*@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
@using System.Net.Http | ||
@using Microsoft.AspNetCore.Components.Forms | ||
@using Microsoft.AspNetCore.Components.Routing | ||
@using Microsoft.AspNetCore.Components.Web | ||
@using Microsoft.JSInterop | ||
|
||
@using BlazorLazyLoading |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
_lazy/ | ||
_lazy.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 9 additions & 12 deletions
21
nuget/BlazorLazyLoading.Module/build/BlazorLazyLoading.Module.props
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,24 @@ | ||
<Project> | ||
|
||
<PropertyGroup> | ||
<BLLGenerateLazyManifest Condition="'$(BLLGenerateLazyManifest)' == ''">true</BLLGenerateLazyManifest> | ||
<BLLGenerateManifest Condition="'$(BLLGenerateManifest)' == ''">true</BLLGenerateManifest> | ||
<RestoreProjectStyle Condition="'$(RestoreProjectStyle)' == ''">PackageReference</RestoreProjectStyle> | ||
<CopyLocalLockFileAssemblies Condition="'$(CopyLocalLockFileAssemblies)' == ''">$(BLLGenerateLazyManifest)</CopyLocalLockFileAssemblies> | ||
<CopyLocalLockFileAssemblies Condition="'$(CopyLocalLockFileAssemblies)' == ''">$(BLLGenerateManifest)</CopyLocalLockFileAssemblies> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<BLLManifestGeneratorAssemblyNames Remove="*" /> | ||
<BLLManifestGeneratorAssemblyPaths Remove="*" /> | ||
|
||
<BLLManifestGeneratorAssemblyNames Include="$(MSBuildProjectName)" /> | ||
<BLLManifestGeneratorAssemblyPaths Include="$(_BLLNugetPackageBuildBinDirectory)" /> | ||
<BLLManifestAssemblies Include="$(MSBuildProjectName)" /> | ||
<BLLManifestAssemblyPaths Include="$(_BLLNugetPackageBuildBinDirectory)" /> | ||
</ItemGroup> | ||
|
||
<PropertyGroup> | ||
<_BLLNugetPackageBuildBinDirectory>$(MSBuildThisFileDirectory)../build/bin/</_BLLNugetPackageBuildBinDirectory> | ||
|
||
<ModuleLazyDirectoryName>_lazy</ModuleLazyDirectoryName> | ||
<ModuleLazyManifestFile>_lazy.json</ModuleLazyManifestFile> | ||
<ModuleWwwRootDirectory>$(MSBuildProjectDirectory)/wwwroot/</ModuleWwwRootDirectory> | ||
<ModuleLazyDirectory>$(ModuleWwwRootDirectory)$(ModuleLazyDirectoryName)/</ModuleLazyDirectory> | ||
<ModuleManifestPath>$(ModuleWwwRootDirectory)$(ModuleLazyManifestFile)</ModuleManifestPath> | ||
<_BLLModuleLazyDirectoryName>_lazy</_BLLModuleLazyDirectoryName> | ||
<_BLLModuleLazyManifestFile>_lazy.json</_BLLModuleLazyManifestFile> | ||
<_BLLModuleWwwRootDirectory>$(MSBuildProjectDirectory)/wwwroot/</_BLLModuleWwwRootDirectory> | ||
<_BLLModuleLazyDirectory>$(_BLLModuleWwwRootDirectory)$(_BLLModuleLazyDirectoryName)/</_BLLModuleLazyDirectory> | ||
<_BLLModuleManifestPath>$(_BLLModuleWwwRootDirectory)$(_BLLModuleLazyManifestFile)</_BLLModuleManifestPath> | ||
</PropertyGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.