johan-v-r / LibSassBuilder

Sass builder for .NET projects
MIT License
99 stars 14 forks source link

Automatically creating ItemGroup/Include references with new files. #45

Open harley-codes opened 2 years ago

harley-codes commented 2 years ago

Maybe I'm doing something wrong, but I have fiddled for a bit and can't stop it from happening.

I took the settings straight from the README.MD Is there something I am doing wrong, or is this a bug?

Varsion: Visual Studio 2022 Project Type: Blazor WASM Hosted

<PropertyGroup>
  <!-- take full-control -->
  <EnableDefaultSassItems>false</EnableDefaultSassItems>
</PropertyGroup>

<ItemGroup>
  <!-- add files manually -->
  <SassFile Include="wwwroot/css/app.scss; **/*.razor.scss" Exclude="Styles/**/*.scss; Styles/*.scss"/>
</ItemGroup

After adding a new file into the 'Styles' folder. An Include item group is added for the scss file.

<ItemGroup>
   <SassFile Include="Styles\StyleSheet.scss" />
</ItemGroup>
harley-codes commented 2 years ago

This actually isn't so much of a problem now, I forgot since last using sass that all my component level items should start with an underscore. So I have no need to try and set any exclusions.