You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!-- This file exposes the following parameters -->
75
+
<!-- TailwindVersion: The version of the Tailwind Standalone CLI to download. -->
76
+
<!-- TailwindDownloadPath: The path to where to download the Tailwind Standalone CLI. This property is optional, and defaults to %LOCALAPPDATA% on Windows, and $XDG_CACHE_HOME on Linux and MacOS. -->
77
+
<!-- TailwindInputStyleSheetPath: The path to the input stylesheet. -->
78
+
<!-- TailwindOutputStyleSheetPath: The path to the output stylesheet. -->
79
+
<!-- TailwindOptimizeOutputStyleSheet: Whether to optimize the output stylesheet. This property is optional, and defaults to false. -->
80
+
<!-- TailwindMinifyOutputStyleSheet: Whether to minify the output stylesheet. This property is optional, and defaults to false when Configuration is Debug, and true when Configuration is Release. -->
81
+
<!-- TailwindDownloadUrl: The URL to the Tailwind Standalone CLI. This property is optional, and defaults to downloading the specified version from GitHub. -->
82
+
83
+
<!-- To override these properties, create a PropertyGroup in the csproj file -->
<TailwindMinifyOutputStyleSheet Condition="$(TailwindMinifyOutputStyleSheet) == '' And '$(Configuration)' == 'Debug'">false</TailwindMinifyOutputStyleSheet>
95
+
<TailwindMinifyOutputStyleSheet Condition="$(TailwindMinifyOutputStyleSheet) == '' And '$(Configuration)' == 'Release'">true</TailwindMinifyOutputStyleSheet>
81
96
82
-
<!-- Provide the path to where Tailwind should be downloaded to -->
97
+
<!-- The path to where Tailwind should be downloaded to -->
83
98
<!-- This should be a path that is writable by the current user, as well as one that is accessible in CI/CD pipelines -->
84
-
<!-- On Linux and MacOS, use $XDG_CACHE_HOME or $HOME/.cache ($HOME/.cache/Tailwind/<TailwindVersion>) -->
85
-
<TailwindDownloadPath Condition="$([System.OperatingSystem]::IsLinux()) Or $([System.OperatingSystem]::IsMacOS())">$([System.IO.Path]::Combine($([MSBuild]::ValueOrDefault($([System.Environment]::GetEnvironmentVariable('XDG_CONFIG_HOME')), $([System.IO.Path]::Combine($([System.Environment]::GetEnvironmentVariable('HOME')), '.cache')))), 'Tailwind'))</TailwindDownloadPath>
99
+
<!-- By default, this is set to the local app data folder on Windows, and $XDG_CACHE_HOME on Linux and MacOS -->
100
+
101
+
<!-- On Linux and MacOS, use $XDG_CACHE_HOME or $HOME/.cache -->
102
+
<TailwindDownloadPath Condition="'$(TailwindDownloadPath)' == '' And ($([System.OperatingSystem]::IsLinux()) Or $([System.OperatingSystem]::IsMacOS()))">$([MSBuild]::ValueOrDefault($([System.Environment]::GetEnvironmentVariable('XDG_CONFIG_HOME')), $([System.IO.Path]::Combine($([System.Environment]::GetEnvironmentVariable('HOME')), '.cache'))))</TailwindDownloadPath>
86
103
87
-
<!-- On Windows, use local app data (%LOCALAPPDATA%\\Tailwind\\<TailwindVersion>) -->
<Error Condition="'$(TailwindVersion)' == ''" Text="Tailwind version not specified. Please specify the version. For example: <PropertyGroup><TailwindVersion>v4.0.14</TailwindVersion></PropertyGroup>"/>
112
+
113
+
<!-- Ensure the input stylesheet path is specified & the file exists -->
114
+
<Error Condition="'$(TailwindInputStyleSheetPath)' == ''" Text="Tailwind input stylesheet not specified. Please specify the path to the input stylesheet in the csproj file. For example: <PropertyGroup><TailwindInputStyleSheetPath>Styles/main.css</TailwindInputStyleSheetPath></PropertyGroup>"/>
115
+
<Error Condition="!Exists('$(TailwindInputStyleSheetPath)')" Text="Tailwind input stylesheet '$(TailwindInputStyleSheetPath)' does not exist. Please specify a path to a stylesheet. For example: <PropertyGroup><TailwindInputStyleSheetPath>Styles/main.css</TailwindInputStyleSheetPath></PropertyGroup>"/>
116
+
117
+
<!-- Ensure the output stylesheet path is specified -->
118
+
<Error Condition="'$(TailwindOutputStyleSheetPath)' == ''" Text="Tailwind output stylesheet not specified. Please specify the path to the output stylesheet in the csproj file. For example: <PropertyGroup><TailwindOutputStyleSheetPath>Styles/main.css</TailwindOutputStyleSheetPath></PropertyGroup>"/>
119
+
120
+
<!-- Ensure the download path is specified -->
121
+
<Error Condition="'$(TailwindDownloadPath)' == ''" Text="Tailwind download path not specified. Please specify the download path in the csproj file. For example: <PropertyGroup><TailwindDownloadPath>/tmp</TailwindDownloadPath></PropertyGroup>"/>
122
+
</Target>
123
+
91
124
<!-- This line supports hot reload by instructing dotnet watch to be aware of modifications to the input stylesheet -->
<!-- On unix systems, make the file executable -->
119
-
<Exec Condition="$([System.OperatingSystem]::IsLinux()) Or $([System.OperatingSystem]::IsMacOS())" Command="chmod +x '$(TailwindCliPath)'"/>
155
+
<Exec Condition="Exists('$(TailwindCliPath)') And ($([System.OperatingSystem]::IsLinux()) Or $([System.OperatingSystem]::IsMacOS()))" Command="chmod +x '$(TailwindCliPath)'"/>
120
156
</Target>
121
157
122
158
<!-- When building the project, run the Tailwind CLI -->
123
159
<!-- This target can also be executed manually. For example, with dotnet watch: \`dotnet watch msbuild /t:Tailwind\` -->
124
160
<!-- In order to use hot reload, run both \`dotnet watch run\` and \`dotnet watch msbuild /t:Tailwind\` -->
0 commit comments