File tree Expand file tree Collapse file tree 4 files changed +17
-11
lines changed
DotnetDevKR.TailwindCSS.Compile Expand file tree Collapse file tree 4 files changed +17
-11
lines changed Original file line number Diff line number Diff line change @@ -15,16 +15,14 @@ public async Task CompileAsync(
1515 string OutputFilename ,
1616 string ProjectDir ,
1717 bool isMinify = false ,
18- bool isDebug = false ,
19- bool watch = false
18+ bool isDebug = false
2019 )
2120 {
2221 var process = CreateTailwindCSSProcess (
2322 MSBuildThisFileDirectory ,
2423 $ "-i { InputFilename } -o { OutputFilename } --cwd { ProjectDir } " +
2524 ( isMinify ? " --minify" : "" ) +
26- ( isDebug ? " --map" : "" ) +
27- ( watch ? " --watch" : "" )
25+ ( isDebug ? " --map" : "" )
2826 ) ;
2927
3028 var errorOutput = new MemoryStream ( ) ;
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ public class TailwindCSSTask : Microsoft.Build.Utilities.Task
1515 public string MSBuildThisFileDirectory { get ; set ; }
1616 public bool IsMinify { get ; set ; } = false ;
1717 public bool DebugMode { get ; set ; } = false ;
18- public bool DotNetWatch { get ; set ; } = false ;
1918
2019 public override bool Execute ( )
2120 {
@@ -32,8 +31,7 @@ public override bool Execute()
3231 OutputFilename ,
3332 ProjectDir ,
3433 IsMinify ,
35- DebugMode ,
36- DotNetWatch
34+ DebugMode
3735 ) . GetAwaiter ( ) . GetResult ( ) ;
3836
3937 return ! Log . HasLoggedErrors ;
Original file line number Diff line number Diff line change 66 Pack =" true"
77 Visible =" false" />
88 </ItemGroup >
9+
10+ <ItemGroup >
11+ <Watch Include =" **\*.razor" AlwaysRebuild =" true" />
12+ <Watch Include =" **\*.html" AlwaysRebuild =" true" />
13+ <Watch Include =" **\*.cshtml" AlwaysRebuild =" true" />
14+ <Watch Include =" **\*.cs" AlwaysRebuild =" true" />
15+ </ItemGroup >
916</Project >
Original file line number Diff line number Diff line change 11<Project >
22 <ItemGroup >
33 <CompilerVisibleProperty Include =" ProjectDir" />
4- <CompilerVisibleProperty Include =" DotnetWatch" />
54 </ItemGroup >
65 <UsingTask TaskName =" TailwindCSSTask" AssemblyFile =" $(MSBuildThisFileDirectory)..\lib\net6.0\DotnetDevKR.TailwindCSS.dll" />
7- <Target Name =" RunTailwindCSSTask" BeforeTargets =" Build" >
6+ <Target
7+ Name =" RunTailwindCSSTask"
8+ BeforeTargets =" Build"
9+ Inputs =" @(Watch);$(InputFilename)"
10+ Outputs =" $(OutputFilename)" >
11+
812 <Message Text =" Running Tailwind CSS task..." Importance =" high" />
913 <TailwindCSSTask
1014 MSBuildThisFileDirectory =" $(MSBuildThisFileDirectory)"
1115 InputFilename =" $(InputFilename)"
1216 OutputFilename =" $(OutputFilename)"
1317 IsMinify =" $(IsMinify)"
1418 DebugMode =" $(DebugMode)"
15- ProjectDir =" $(ProjectDir)"
16- DotNetWatch =" $(DotNetWatch)" />
19+ ProjectDir =" $(ProjectDir)" />
1720 </Target >
1821</Project >
You can’t perform that action at this time.
0 commit comments