DartSassBuilder 0.1.3-beta

This is a prerelease version of DartSassBuilder.
There is a newer version of this package available.
See the version list below for details.
dotnet add package DartSassBuilder --version 0.1.3-beta
                    
NuGet\Install-Package DartSassBuilder -Version 0.1.3-beta
                    
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="DartSassBuilder" Version="0.1.3-beta" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DartSassBuilder" Version="0.1.3-beta" />
                    
Directory.Packages.props
<PackageReference Include="DartSassBuilder" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DartSassBuilder --version 0.1.3-beta
                    
#r "nuget: DartSassBuilder, 0.1.3-beta"
                    
#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.
#addin nuget:?package=DartSassBuilder&version=0.1.3-beta&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=DartSassBuilder&version=0.1.3-beta&prerelease
                    
Install as a Cake Tool

DartSassBuilder

A dart-compiled version of LibSassBuilder, using DartSassHost

Build NuGet Package .NET Global Tool
Build Nuget .NET Tool

Nuget Package

DartSassBuilder NuGet package adds a build task to compile Sass files to .css. It's compatible with both MSBuild (VS) and dotnet build.

No configuration is required, it will compile the files implicitly on project build.

  • Optionally provide arguments (see Options below):

<PropertyGroup>
  
  <DartSassOutputStyle>compressed</DartSassOutputStyle>
  <DartSassOutputStyle Condition="'$(Configuration)' == 'Debug'">expanded</DartSassOutputStyle>
  
  <DartSassOutputLevel>verbose</DartSassOutputLevel>
  
  <DartSassMessageLevel>High</DartSassMessageLevel>
</PropertyGroup>
  • Or take control of what files to process

<PropertyGroup>
  
  <EnableDefaultSassItems>false</EnableDefaultSassItems>  
</PropertyGroup>

<ItemGroup>
  
  <SassFile Include="Vendor/**/*.scss" /> 
  <SassFile Include="Styles/**/*.scss" Exclude="Styles/unused/**" />
</ItemGroup>
  • Or ignore all previous options (except for <DartSassMessageLevel>) and determine the arguments to the tool yourself

<PropertyGroup>
  
  <DartSassBuilderArgs>directory "$(MSBuildProjectDirectory)"</DartSassBuilderArgs>
  
  <DartSassMessageLevel>High</DartSassMessageLevel>
</PropertyGroup>

.NET Global Tool

Install:

dotnet tool install --global DartSassBuilder

Use:

dsb [optional-path] [options]
dsb help
dsb help directory
dsb help files

Generic options

-l, --level      Specify the level of output (silent, default, verbose)

--outputstyle    Specify the style of output (compressed, condensed, nested, expanded)

Directory command (default)

Scans a directory recursively to generate .css files

-e, --exclude    (Default: bin obj logs node_modules) Specify explicit directories to exclude. Overrides the default.

--help           Display this help screen.

--version        Display version information.

value pos. 0     Directory in which to run. Defaults to current directory.

Example:

dsb directory
dsb directory sources/styles -e node_modules
dsb directory sources/styles -e node_modules -l verbose

Files in the following directories are excluded by default:

  • bin
  • obj
  • logs
  • node_modules

Files command (default)

Processes the files given on the commandline

--help           Display this help screen.

--version        Display version information.

value pos. 0     File(s) to process.

Example:

dsb files sources/style/a.scss sources/vendor/b.scss
dsb files sources/style/a.scss sources/vendor/b.scss -l verbose

Requirements

DartSassBuilder can be installed on any project, however the underlying build tool requires .NET 5 installed on the machine.

Support

The support is largely dependant on DartSassHost

This tool contains the following supporting packages:

  • Microsoft.ClearScript.V8.Native.win-x64
  • Microsoft.ClearScript.V8.Native.linux-x64
  • Microsoft.ClearScript.V8.Native.osx-x64

Package as nuget package

./package.ps1 -PackageDir 'C:/LocalPackages' -Version '1.4.0.1'
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages (10)

Showing the top 5 NuGet packages that depend on DartSassBuilder:

Package Downloads
0xor1.Common.Client

Common classes I use in all of my projects for client side usage.

TnTComponents

Package Description

InsaShellRCL

Package Description

Hopp.Portal.Client

MigFx Library for public use in Client extensions

SocialGuard.YC

SocialGuard Plugin for YumeChan

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on DartSassBuilder:

Repository Stars
radzenhq/radzen-blazor
Radzen Blazor is a set of 90+ free native Blazor UI components packed with DataGrid, Scheduler, Charts and robust theming including Material design and FluentUI.
Version Downloads Last Updated
1.1.0 476,606 2/25/2024
1.0.0 3,923,693 3/21/2023
0.4.0-beta 980 3/12/2023
0.3.0-beta 2,038 3/29/2022
0.2.2-beta 1,310 3/12/2022
0.2.1-beta 5,795 11/15/2021
0.2.0-beta 724 11/13/2021
0.1.3-beta 938 10/28/2021
0.1.2 1,117 10/8/2021
0.1.1 729 9/19/2021
0.1.0 832 9/19/2021