Recognize SCSS and Stylus as source for CSS files (#770)

This commit is contained in:
0xflotus 2021-01-14 13:54:45 +01:00 committed by GitHub
parent a6ad5fa2cd
commit d11ac5d49b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,7 +16,8 @@ impl<'a> File<'a> {
pub fn get_source_files(&self) -> Vec<PathBuf> { pub fn get_source_files(&self) -> Vec<PathBuf> {
if let Some(ext) = &self.ext { if let Some(ext) = &self.ext {
match &ext[..] { match &ext[..] {
"css" => vec![self.path.with_extension("sass"), self.path.with_extension("less")], // SASS, Less "css" => vec![self.path.with_extension("sass"), self.path.with_extension("scss"), // SASS, SCSS
self.path.with_extension("styl"), self.path.with_extension("less")], // Stylus, Less
"js" => vec![self.path.with_extension("coffee"), self.path.with_extension("ts")], // CoffeeScript, TypeScript "js" => vec![self.path.with_extension("coffee"), self.path.with_extension("ts")], // CoffeeScript, TypeScript
"aux" | // TeX: auxiliary file "aux" | // TeX: auxiliary file