Skip to content

Conversation

@SteveSandersonMS
Copy link
Member

@SteveSandersonMS SteveSandersonMS commented Jul 3, 2020

Implementation for #22774

The build will fail at the moment because Microsoft.Css.Parser isn't available in any of our package sources, but I've restored it locally and it works. Update: should be able to build correctly now, as that package is now published on the dotnet-eng feed.

This is a new Razor SDK command. Given a set of (inputfilename, outputfilename, scopeid) triplets, it reads all the input files, and writes them back out to the corresponding output filenames, having mutated the contents to inject the scopeid strings in the right places to achieve CSS isolation.

This should fit in with the broader pattern of using DotNetToolTask and implementing support for incrementalism within that wrapper task.

@SteveSandersonMS SteveSandersonMS added the area-blazor Includes: Blazor, Razor Components label Jul 3, 2020
@SteveSandersonMS SteveSandersonMS added this to the 5.0.0-preview8 milestone Jul 3, 2020
@SteveSandersonMS SteveSandersonMS requested a review from a team July 3, 2020 16:22
@SteveSandersonMS SteveSandersonMS requested a review from dougbu as a code owner July 3, 2020 16:22
@SteveSandersonMS SteveSandersonMS force-pushed the stevesa/css-isolation-rewriter-tool branch from b51b6f4 to 6c766e5 Compare July 7, 2020 11:25
Copy link
Member

@javiercn javiercn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks solid!

I imagine there might be a chance that we missed some rewrites, but nothing we can fix in the future. (Just a hypothesis based on the nuances of CSS)

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

Labels

area-blazor Includes: Blazor, Razor Components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants