DotnetDevKR.TailwindCSS
Purpose
The main NuGet package project that provides MSBuild integration for TailwindCSS compilation. This is the package users install via dotnet add package DotnetDevKR.TailwindCSS.
Key Files
DotnetDevKR.TailwindCSS.csproj- NuGet package project definition- Targets .NET 6.0
- References
Microsoft.Build.Utilities.Corefor MSBuild task support - Includes
DotnetDevKR.TailwindCSS.Compileas a bundled dependency - Packages build targets, props, and runtime executables
TailwindCSSTask.cs- MSBuild task implementation- Inherits from
Microsoft.Build.Utilities.Task - Properties:
InputFilename,OutputFilename,ProjectDir,IsMinify,DebugMode - Delegates compilation to
TailwindCSSCompiler
- Inherits from
Subdirectories
build/- MSBuild integration files (see build/AGENTS.md)runtime/- TailwindCSS executables and installer (see runtime/AGENTS.md)
For AI Agents
Package Structure
When packed, the NuGet package contains:
lib/
net6.0/
DotnetDevKR.TailwindCSS.dll
DotnetDevKR.TailwindCSS.Compile.dll
build/
DotnetDevKR.TailwindCSS.props
DotnetDevKR.TailwindCSS.targets
runtime/
tailwindcss-* (platform executables)
README.md
MSBuild Integration
The package uses standard NuGet MSBuild integration:
.propsfile is imported at the start of the consuming project.targetsfile is imported at the endRunTailwindCSSTasktarget runs beforeBuild
TailwindCSSTask Properties
| Property | Required | Description |
|---|---|---|
OutputFilename | Yes | Where to write compiled CSS |
InputFilename | No | Source CSS file |
ProjectDir | No | Working directory for TailwindCSS |
IsMinify | No | Enable minification |
DebugMode | No | Generate source maps |
Modifying Build Logic
- Task properties →
TailwindCSSTask.cs - When task runs →
build/DotnetDevKR.TailwindCSS.targets - Default configurations →
build/DotnetDevKR.TailwindCSS.props
Dependencies
Microsoft.Build.Utilities.Core(v15.9.20) - MSBuild task base classDotnetDevKR.TailwindCSS.Compile- Internal compiler library