#tailwind #scanner #css

tailwind-rs-scanner

Advanced content scanning for Tailwind-RS Core

10 releases (4 breaking)

0.16.0 Sep 26, 2025
0.15.4 Sep 27, 2025
0.14.0 Sep 26, 2025
0.13.0 Sep 26, 2025
0.10.0 Sep 25, 2025

#2592 in Web programming

MIT license

64KB
1.5K SLoC

tailwind-rs-scanner

Advanced content scanning for Tailwind-RS Core, providing intelligent class detection and extraction from source files.

This crate provides comprehensive content scanning capabilities:

  • Multi-language support (Rust, JavaScript, TypeScript, HTML, etc.)
  • Parallel file processing for performance
  • Intelligent class extraction with context awareness
  • File watching and incremental updates
  • Tree-sitter integration for accurate parsing

Features

  • Multi-Language Support: Rust, JS/TS, HTML, Vue, Svelte, and more
  • Parallel Processing: Multi-threaded file scanning for speed
  • Intelligent Extraction: Context-aware class detection
  • File Watching: Real-time file change detection
  • Tree-sitter Integration: Accurate AST-based parsing
  • Performance: Optimized for large codebases

Example

use tailwind_rs_scanner::*;

#[tokio::main]
async fn main() -> Result<(), ScannerError> {
    let scanner = ContentScanner::new(ScanConfig::default())?;
    
    let classes = scanner.scan_for_classes().await?;
    println!("Found {} classes", classes.total_classes());
    
    // Watch for changes
    let mut watcher = scanner.watch().await?;
    while let Some(update) = watcher.next().await {
        println!("Classes updated: {:?}", update);
    }
    
    Ok(())
}

Dependencies

~8–14MB
~245K SLoC