Add sass support
This commit is contained in:
1 parent
ea723f64cd
commit
f7f1d90520
3 files changed
+25
-4
No files matched your search
+13
-1
@@ -45,4 +45,16 @@ script = []
|
|||||||
binaryen = { wasm_opt = true }
|
binaryen = { wasm_opt = true }
|
||||||
|
|
||||||
# use sass auto will auto check sass file and build it.
|
# use sass auto will auto check sass file and build it.
|
||||||
sass = { auto = true }
|
[application.tools.sass]
|
||||||
|
|
||||||
|
version = "1.51.0"
|
||||||
|
|
||||||
|
# if auto = true, we will check style array, and translate all sass file to css.
|
||||||
|
auto = true
|
||||||
|
|
||||||
|
# or you can specify some sass file -> css file
|
||||||
|
files = [
|
||||||
|
# some sass file path
|
||||||
|
# this file will translate to `/css/test.css`
|
||||||
|
"/css/test.sass"
|
||||||
|
]
|
||||||
+5
-2
@@ -27,7 +27,11 @@ impl Tool {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Tool::AppPath {} => {
|
Tool::AppPath {} => {
|
||||||
println!("{}", tools::tools_path().to_str().unwrap());
|
if let Some(v) = tools::tools_path().to_str() {
|
||||||
|
println!("{}", v);
|
||||||
|
} else {
|
||||||
|
log::error!("Tools path get failed.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Tool::Add { name } => {
|
Tool::Add { name } => {
|
||||||
let tool_list = tools::tool_list();
|
let tool_list = tools::tool_list();
|
||||||
@@ -58,7 +62,6 @@ impl Tool {
|
|||||||
log::info!("Tool {name} install successfully!");
|
log::info!("Tool {name} install successfully!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+7
-1
@@ -201,7 +201,13 @@ impl Tool {
|
|||||||
command.to_string()
|
command.to_string()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Tool::Sass => command.to_string(),
|
Tool::Sass => {
|
||||||
|
if cfg!(target_os = "windows") {
|
||||||
|
format!("{}.bat", command)
|
||||||
|
} else {
|
||||||
|
command.to_string()
|
||||||
|
}
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
if !bin_path.join(&command_file).is_file() {
|
if !bin_path.join(&command_file).is_file() {
|
||||||
|
|||||||
Reference in new issue
Block a user