Skip to content

Commit

Permalink
include minified css only
Browse files Browse the repository at this point in the history
  • Loading branch information
erinnmclaughlin committed May 18, 2024
1 parent 46bd5f4 commit 6ac6967
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 16 deletions.
13 changes: 1 addition & 12 deletions docs/HeadlessBlazor.Docs/HeadlessBlazor.Docs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,15 @@
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.4" />
</ItemGroup>

<!-- Add SCSS files to dotnet watch -->
<ItemGroup>
<Watch Include="..\**\*.scss" />
<None Update="..\**\*.css" watch="false" />
</ItemGroup>

<!-- Compile SCSS files into CSS -->
<ItemGroup>
<ComponentScssFiles Include="../**/*/*.scss" Exclude="node_modules/**;wwwroot/**;Styles/**" />
</ItemGroup>

<!-- Compile SCSS files into CSS -->
<Target Name="CompileComponentSass" BeforeTargets="CompileGlobalSass">
<Message Text="Compiling Component SCSS files" Importance="high" />
<Exec Condition="!$([System.Text.RegularExpressions.Regex]::IsMatch('%(ComponentScssFiles.Identity)', `.*[/\\]_.*`))" Command="npm run sass -- --style=compressed --no-source-map --load-path=Styles/Core %(ComponentScssFiles.Identity) %(relativedir)%(filename).css" />
</Target>

<Target Name="CompileGlobalSass" BeforeTargets="Compile">
<Message Text="Compiling global SCSS file" Importance="high" />
<Exec Command="npm run sass -- --style=compressed Styles:wwwroot/css" />
<Exec Command="npm run sass -- --style compressed Styles/app.scss:wwwroot/css/app.min.css" />
</Target>

</Project>
1 change: 0 additions & 1 deletion docs/HeadlessBlazor.Docs/wwwroot/css/app.css

This file was deleted.

1 change: 0 additions & 1 deletion docs/HeadlessBlazor.Docs/wwwroot/css/app.css.map

This file was deleted.

2 changes: 1 addition & 1 deletion docs/HeadlessBlazor.Docs/wwwroot/css/app.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/HeadlessBlazor.Docs/wwwroot/css/app.min.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6ac6967

Please sign in to comment.