Skip to content

Comments

Move UI Client files to StaticAssets project and refactor build targets#15055

Closed
ronaldbarendse wants to merge 4 commits intocontribfrom
feature/staticassets-build
Closed

Move UI Client files to StaticAssets project and refactor build targets#15055
ronaldbarendse wants to merge 4 commits intocontribfrom
feature/staticassets-build

Conversation

@ronaldbarendse
Copy link
Contributor

Prerequisites

  • I have added steps to test this contribution in the description below

Description

One of the biggest hurdles with getting started with the CMS codebase (for contributing and debugging) is currently the fact that you need to first manually run npm commands to build the front-end bits. Also, if NPM packages get updated, you need to manually re-run npm ci to get the correct/latest versions installed.

For our commercial products, we're already using an adaptation of the MicrosoftAspNetCore.ClientAssets build targets, which takes care of automatically restoring and building NPM client assets as part of the .NET build. There are plans to integrate this into the .NET SDK, but that has recently been delayed to .NET 9...

Testing can be done by checking whether the build output (specifically the Umbraco.Cms.StaticAssets NuGet package) contains the correct assets and the backoffice still runs when checking out a fresh copy of this PR and running dotnet run --project src\Umbraco.Web.UI (spoiler: this will do a .NET restore and build, NPM install and build, and finally start the application and show the installer screen).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants