do not clear the Rust cache

The candidates from the content files are still going to be correct as
long as the file didn't change.
This commit is contained in:
Robin Malfait 2024-03-08 00:36:21 +01:00
parent 115417fed4
commit a0f23d3306
No known key found for this signature in database

View file

@ -1,12 +1,5 @@
import watcher from '@parcel/watcher'
import {
IO,
Parsing,
clearCache,
scanDir,
scanFiles,
type ChangedContent,
} from '@tailwindcss/oxide'
import { IO, Parsing, scanDir, scanFiles, type ChangedContent } from '@tailwindcss/oxide'
import { existsSync } from 'node:fs'
import fs from 'node:fs/promises'
import path from 'node:path'
@ -164,9 +157,6 @@ export async function handle(args: Result<ReturnType<typeof options>>) {
// Scan the entire `base` directory for full rebuilds.
if (rebuildStrategy === 'full') {
// Clear the cache because we need to re-scan the entire directory.
clearCache()
// Re-scan the directory to get the new `candidates`.
candidates = scanDir({ base }).candidates