| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A .NET MSBuild integration package for TailwindCSS that automatically compiles your TailwindCSS files during the build process. This package includes cross-platform TailwindCSS standalone executables and provides seamless integration with .NET projects.
Install the NuGet package in your .NET project:
dotnet add package DotnetDevKR.TailwindCSSYou can also install the package from GitHub Packages:
Add GitHub Packages as a NuGet source (one time setup):
dotnet nuget add source https://nuget.pkg.github.com/dotnetdev-kr/index.json \
--name github \
--username YOUR_GITHUB_USERNAME \
--password YOUR_GITHUB_PAT \
--store-password-in-clear-textInstall the package:
dotnet add package DotnetDevKR.TailwindCSSNote: You need a GitHub Personal Access Token (PAT) with read:packages scope to install from GitHub Packages.
Warning
Rebuilding when dotnet watch is not working, so If you use dotnet watch, hit Ctrl + R
@import "tailwindcss";<Target Name="Configure" BeforeTargets="RunTailwindCSSTask">
<PropertyGroup>
<InputFilename>$(ProjectDir)tailwind.css</InputFilename>
<OutputFilename>wwwroot\css\app.css</OutputFilename>
<IsMinify>false</IsMinify>
<DebugMode>true</DebugMode>
</PropertyGroup>
</Target>Configure the TailwindCSS compilation by setting these properties in your project file:
| Property | Description | Default | Required |
|---|---|---|---|
| InputFilename | Path to the input TailwindCSS file | - | No |
| OutputFilename | Path where the compiled CSS will be saved | - | ✅ Yes |
| IsMinify | Enable CSS minification | false | No |
| DebugMode | Generate source maps | false | No |
| ProjectDir | Project directory for TailwindCSS context | Current directory | No |
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="DotnetDevKR.TailwindCSS" Version="0.0.1" />
</ItemGroup>
<Target Name="Configure" BeforeTargets="RunTailwindCSSTask">
<PropertyGroup>
<InputFilename>$(ProjectDir)tailwind.css</InputFilename>
<OutputFilename>wwwroot\css\app.css</OutputFilename>
<IsMinify Condition="'$(Configuration)' == 'Release'">true</IsMinify>
<DebugMode Condition="'$(Configuration)' == 'Debug'">true</DebugMode>
</PropertyGroup>
</Target>
</Project>Check out the DotnetDevKR.TailwindCSS.WebTest folder for a complete Blazor WebAssembly example that demonstrates:
This package follows a 4-part version scheme that directly maps to TailwindCSS versions:
{TailwindMajor}.{TailwindMinor}.{TailwindPatch}.{Revision}
| Package Version | TailwindCSS Version | Revision |
|---|---|---|
| 4.1.17.0 | v4.1.17 | 0 |
| 4.1.17.1 | v4.1.17 | 1 |
| 4.2.0.0 | v4.2.0 | 0 |
This versioning makes it easy to identify which TailwindCSS version is included in the package at a glance.
This package automatically stays up-to-date with the latest TailwindCSS releases:
When a new TailwindCSS version is released, our GitHub Actions workflow:
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the Mozilla Public License 2.0 - see the LICENSE.md file for details.
Made with ❤️ by DotnetDevKR and Forum
| Back | FazBrowse Home | New Git URL |