Skip to content

Commit 1134ddf

Browse files
committed
_do_ scan .css files but only for CSS variable usage
1 parent 4ff21a3 commit 1134ddf

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

crates/oxide/src/scanner/fixtures/ignored-extensions.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
css
21
less
32
lock
43
sass

crates/oxide/src/scanner/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ pub struct Scanner {
8484
/// All found extensions
8585
extensions: FxHashSet<String>,
8686

87+
/// All CSS files we want to scan for CSS variable usage
88+
css_files: Vec<PathBuf>,
89+
8790
/// All files that we have to scan
8891
files: Vec<PathBuf>,
8992

@@ -248,6 +251,12 @@ impl Scanner {
248251
.and_then(|x| x.to_str())
249252
.unwrap_or_default(); // In case the file has no extension
250253

254+
// Special handing for CSS files to extract CSS variables
255+
if extension == "css" {
256+
self.css_files.push(path);
257+
continue;
258+
}
259+
251260
self.extensions.insert(extension.to_owned());
252261
self.changed_content.push(ChangedContent::File(
253262
path.to_path_buf(),

0 commit comments

Comments
 (0)