Repository navigation
Replies: 5 comments 1 reply
|
Some things to try:
Otherwise, run with |
|
@import "tailwindcss" source(none);
@source "../src"; |
|
Thanks for you suggestions. @wongjn Still causes the sub second execution of tailwindcss due to jj snapshot in VisualJJ. The root of my project is .jj so i ran originally The path was relative to style.css everthing is in root. If i run the following powershell script in my working folder this reports that VisualJJ in vscode frequently touches ./jj folder. $w = New-Object System.IO.FileSystemWatcher $PWD
$w.IncludeSubdirectories = $true
$w.EnableRaisingEvents = $true
Register-ObjectEvent $w Changed -Action { Write-Host (Get-Date -Format HH:mm:ss.fff) $Event.SourceEventArgs.FullPath } | Out-Null
Register-ObjectEvent $w Created -Action { Write-Host (Get-Date -Format HH:mm:ss.fff) 'CREATED' $Event.SourceEventArgs.FullPath } | Out-NullOutput when launching vscode. If VisualJJ is not enabled in VSCode this doesn't happen. This is what is triggering tailwindcss. If I use this tailwindcss.ps1 script to use a specific file system watcher directly and just $watcher = New-Object System.IO.FileSystemWatcher $PWD -Property @{
Filter = "*.*"
IncludeSubdirectories = $false
}
$debounceMilliseconds = 300
$pending = $false
$lastChange = [DateTime]::MinValue
while ($true) {
$change = $watcher.WaitForChanged([System.IO.WatcherChangeTypes]::Changed -bor [System.IO.WatcherChangeTypes]::Created, 1000)
if ($change.TimedOut -eq $false -and $change.Name -match '\.(html|js|css)$' -and $change.Name -ne 'tailwind.css') {
$pending = $true
$lastChange = [DateTime]::UtcNow
}
if ($pending -and ([DateTime]::UtcNow - $lastChange).TotalMilliseconds -ge $debounceMilliseconds) {
$pending = $false
Write-Host "File changed: $($change.Name) - Rebuilding..." -ForegroundColor Cyan
tailwindcss -i style.css -o tailwind.css
}
}
@g4lb That works With top of style.css having @import "tailwindcss" source(none);
@source "../src"; |
|
Two ways to stop it:
@import "tailwindcss" source("./src");The path is relative to the CSS file. Move your source folders under
Polling re-walks the sources through the normal ignore rules every 250 ms ( Making the native watcher respect the same rules would need a CLI change, so a feature request for that is reasonable. |
|
Tailwind CSS v4 automatically ignores You can stop Tailwind from scanning Method 1: Add
|
Uh oh!
There was an error while loading. Please reload this page.
./.jj/is the folder of jj version control system jujutsu.I tried adding "./.jj/" to .gitignore but tailwindcss still sees changes in it.
I added it to @source not in styles.css of tailwind css file and it still sees it.
I have VisualJJ installed in vscode and it snapshots ./jj for file changes - standard behavior.
So when standard tailwind with normal
--watchis set to build tailwind.css output.Any change causes jj snapshot, which causes tailwind build which causes jj snapshot ad infinitum.
I created small powershell script that creates a file watch for the files I care about and it runs tailwindcss when they change just fine.
Making tailwindcss ignore
./.jj/might be worth while?Clarifying how to make it ignore paths might be worth while?
I couldn't figure out how to make it ignore
./.jj/I am using using tailwindcss as installed by winget on windows 10.
All reactions