Skip to content

Commit be1f087

Browse files
Added overridable <TailwindBinaryFile> property.
Added logging for OS and Platform values. Upgraded to Tailwind 3.4.10
1 parent d540b25 commit be1f087

13 files changed

+56
-38
lines changed

Readme.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ You can use `@import` to import different files like so:
7171

7272
### Customizing file locations
7373
You can change the input and output file paths by adding the following properties in your `.csproj`:
74-
```
74+
```xml
7575
<PropertyGroup>
7676
<TailwindConfigFile>path/to/your/tailwind.config.js</TailwindConfigFile>
7777
<TailwindInputFile>path/to/your/input/file.css</TailwindInputFile>
@@ -80,17 +80,29 @@ You can change the input and output file paths by adding the following propertie
8080
```
8181

8282
The defaults for these properties are:
83-
```
83+
```xml
8484
<PropertyGroup>
8585
<TailwindConfigFile>tailwind/tailwind.config.js</TailwindConfigFile>
8686
<TailwindInputFile>tailwind/tailwind.input.css</TailwindInputFile>
8787
<TailwindOutputFile>wwwroot/tailwind.output.css</TailwindOutputFile>
8888
</PropertyGroup>
8989
```
9090

91+
### Override the build binary
92+
You can override the binary used in the tailwind command:
93+
```xml
94+
<PropertyGroup>
95+
<TailwindBinaryFile>tailwindcss-linux-arm64</TailwindBinaryFile>
96+
</PropertyGroup>
97+
```
98+
99+
See the 'lib/tools' folder in this project for the binaries that can be used.
100+
101+
By default, the build tries to select the correct binary based on the `OS` and `Platform` properties of MSBuild.
102+
91103
### Disable default files copy action
92104
The library copies default files (`tailwind/tailwind.config.js` and `tailwind/tailwind.input.css`) to your project. To disable this, add the following property:
93-
```
105+
```xml
94106
<PropertyGroup>
95107
<TailwindCopyDefaultFiles>false</TailwindCopyDefaultFiles>
96108
</PropertyGroup>

mvdmio.Tailwind.NET/lib/build/mvdmio.Tailwind.NET.props

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@
1414
<TailwindBinaryExt Condition="'$(OS)' == 'Windows_NT'">.exe</TailwindBinaryExt>
1515
<TailwindBinaryExt Condition="'$(OS)' != 'Windows_NT'"></TailwindBinaryExt>
1616

17+
<!-- Construct the binary file -->
18+
<TailwindBinaryFile>tailwindcss-$(TailwindBinaryOS)-$(TailwindBinaryArch)$(TailwindBinaryExt)</TailwindBinaryFile>
19+
1720
<!-- Construct the final binary file path -->
18-
<TailwindBinaryPath>$(MSBuildThisFileDirectory)..\tools\tailwindcss-$(TailwindBinaryOS)-$(TailwindBinaryArch)$(TailwindBinaryExt)</TailwindBinaryPath>
21+
<TailwindBinaryPath>$(MSBuildThisFileDirectory)..\tools\$(TailwindBinaryFile)</TailwindBinaryPath>
1922

2023
<!-- Files to inlcude in the target project -->
2124
<TailwindFilesSourcepath>$(MSBuildThisFileDirectory)..\files</TailwindFilesSourcepath>

0 commit comments

Comments
 (0)