TailwindBuild is designed to integrate with MSBuild to allow for the usage of Tailwind within projects without needing to use npm.
Note
Currently we only work for Tailwind >=4.0.0 and < 5.x.x
dontet add package TailwindBuild
MSBuild Property Name | Default Value | Description |
---|---|---|
TailwindVersion | latest |
The version tag of the tailwind release to use. |
TailwindInstallPath | $(MSBuildThisFileDirectory)..\cli\ |
The directory where the tailwindcss cli should be located. |
TailwindWorkingDir | $(MSBuildProjectDirectory)\ |
The directory which will be used as the working dir for tailwind. |
TailwindInputFile | tailwind.css |
The name of the input css file. |
TailwindOutputFile | $(MSBuildProjectDirectory)\wwwroot\css\output.css |
The path where the output css file will be located. |
TailwindMinify | false for Debug builds, true for Release builds |
Whether the generated css should be minified or not. |
TailwindWatch | false (Will only work during a dotnet watch build) |
Watch for changes. |
TailwindGithubAuthToken | `` | (Optional) Used to authenticate against the GitHub api to prevent rate limiting. |
- When using Rider the Jetbrains Language server will not work if a
package.json
containingtailwlindcss
as a dependency cannot be found. It is recommended to create a simplepackage.json
as a workaround