BizStream.Kentico.Xperience.AspNetCore.StaticWebAssetsStorage 1.1.0-alpha.0f39ddb

This is a prerelease version of BizStream.Kentico.Xperience.AspNetCore.StaticWebAssetsStorage.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package BizStream.Kentico.Xperience.AspNetCore.StaticWebAssetsStorage --version 1.1.0-alpha.0f39ddb                
NuGet\Install-Package BizStream.Kentico.Xperience.AspNetCore.StaticWebAssetsStorage -Version 1.1.0-alpha.0f39ddb                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BizStream.Kentico.Xperience.AspNetCore.StaticWebAssetsStorage" Version="1.1.0-alpha.0f39ddb" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BizStream.Kentico.Xperience.AspNetCore.StaticWebAssetsStorage --version 1.1.0-alpha.0f39ddb                
#r "nuget: BizStream.Kentico.Xperience.AspNetCore.StaticWebAssetsStorage, 1.1.0-alpha.0f39ddb"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install BizStream.Kentico.Xperience.AspNetCore.StaticWebAssetsStorage as a Cake Addin
#addin nuget:?package=BizStream.Kentico.Xperience.AspNetCore.StaticWebAssetsStorage&version=1.1.0-alpha.0f39ddb&prerelease

// Install BizStream.Kentico.Xperience.AspNetCore.StaticWebAssetsStorage as a Cake Tool
#tool nuget:?package=BizStream.Kentico.Xperience.AspNetCore.StaticWebAssetsStorage&version=1.1.0-alpha.0f39ddb&prerelease                

Static Web Assets Storage License NuGet Version

This package provides an AbstractStorageProvider implementation, and an accompanying Module, that allow Xperience Page Builder to auto-discover static assets bundled from Razor Class Libraries during Localhost development.

Usage

  • Install the package into your Xperience Mvc project:
dotnet add package BizStream.Kentico.Xperience.AspNetCore.StaticWebAssetsStorage

OR

<PackageReference Include="BizStream.Kentico.Xperience.AspNetCore.StaticWebAssetsStorage" Version="x.x.x" />
  • Register the Module (within the Mvc Application only):
using BizStream.Kentico.Xperience.AspNetCore.StaticWebAssetsStorage;
using CMS;

[assembly: RegisterModule( typeof( StaticWebAssetsStorageModule ) )]
  • Configure services in Startup.cs:
using BizStream.Kentico.Xperience.AspNetCore.StaticWebAssetsStorage;
using Kentico.PageBuilder.Web.Mvc;
using Microsoft.Extensions.DependencyInjection;

// ...

public void ConfigureServices( IServiceCollection services )
{
    services.AddControllersWithViews();

    Assembly rclAssembly = /* ... */
    services.AddStaticWebAssetsStorage()
        .AddOptions<PageBuilderBundlesOptions>()
        .ConfigureRCLBundle( rclAssembly, "dist\\PageBuilder" );
}

Configuring Environments

As RCL static assets are included when packed (via dotnet pack or dotnet publish), the StaticWebAssetsStorageProvider only needs to be registered for localhost development environments. If a custom environment name is used for localhost development, expose the environment name to the StaticWebAssetsStorageModule via the StaticWebAssetsStorageOptions.EnvironmentNames option:

using BizStream.Kentico.Xperience.AspNetCore.StaticWebAssetsStorage;
using Kentico.PageBuilder.Web.Mvc;
using Microsoft.Extensions.DependencyInjection;

// ...

public void ConfigureServices( IServiceCollection services )
{
    services.AddControllersWithViews();

    services.AddStaticWebAssetsStorage(
        options => options.EnvironmentNames.Add( "MyCustomEnvironment" )
    );

    // OR, using OptionsBuilder:
    services.AddOptions<StaticWebAssetsStorageOptions>()
        .PostConfigure(
            options => options.EnvironmentNames.Add( "MyCustomEnvironment" )
        );

    // ...
}

StaticWebAssetsStorageOptions.EnvironmentNames is initialized with a default value containing the Development environment name.

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.0-beta.933c63b 352 12/9/2021
1.1.0-alpha.b0621c1 154 12/9/2021
1.1.0-alpha.0f39ddb 295 12/9/2021
1.0.4 8,737 8/27/2021
1.0.4-beta.6fd746a 149 8/27/2021
1.0.3 417 8/27/2021
1.0.2 403 8/27/2021
1.0.2-beta.a8b7e27 162 8/27/2021
1.0.1 993 7/14/2021
1.0.1-beta.a70fc3b 161 7/14/2021
1.0.0 460 7/14/2021 1.0.0 is deprecated because it has critical bugs.