[FIX] fixed typo : tailwind-css -> tailwindcss
This commit is contained in:
1 parent
014df14a24
commit
7aa8feaa49
4 files changed
+13
-13
No files matched your search
+2
-2
@@ -44,5 +44,5 @@ script = []
|
||||
# binaryen just will trigger in `web` platform
|
||||
binaryen = { wasm_opt = true }
|
||||
|
||||
# enable tailwind-css CSS building
|
||||
tailwind-css= { input = "/somewhere", config = "yay"}
|
||||
# enable tailwindcss CSS building
|
||||
tailwindcss= { input = "/somewhere", config = "yay"}
|
||||
@@ -37,15 +37,15 @@ You can combine different tools with `dioxus`.
|
||||
```
|
||||
Use the `wasm_opt = true` key/pair value to activate optimization with wasm-opt.
|
||||
When building on `release` profile, Dioxus will run `wasm_opt` with `-Oz` option.
|
||||
2. ***tailwind-css*** - Use the `tailwind-css` standalone binary to generate a Tailwind CSS bundle file.
|
||||
2. ***tailwindcss*** - Use the `tailwindcss` standalone binary to generate a Tailwind CSS bundle file.
|
||||
```
|
||||
tailwind-css = { input = "main.css", config = "tailwind.config.js" }
|
||||
tailwindcss = { input = "main.css", config = "tailwind.config.js" }
|
||||
```
|
||||
You can set two optional keys :
|
||||
- input: path of the input CSS file (default value is "public/tailwind.css")
|
||||
- config: path to the config file for Tailwind (default value is "src/tailwind.config.js")
|
||||
|
||||
When building on `release` profile, Dioxus will run `tailwind-css` with the `--minify` option.
|
||||
When building on `release` profile, Dioxus will run `tailwindcss` with the `--minify` option.
|
||||
|
||||
Note : Dioxus will automatically include the generated tailwind file in the `index.html`
|
||||
|
||||
|
||||
+5
-5
@@ -167,8 +167,8 @@ pub fn build(config: &CrateConfig, quiet: bool) -> Result<BuildResult> {
|
||||
}
|
||||
|
||||
// [5][OPTIONAL] If tailwind is enabled and installed we run it to generate the CSS
|
||||
if dioxus_tools.contains_key("tailwind-css") {
|
||||
let info = dioxus_tools.get("tailwind-css").unwrap();
|
||||
if dioxus_tools.contains_key("tailwindcss") {
|
||||
let info = dioxus_tools.get("tailwindcss").unwrap();
|
||||
let tailwind = crate::tools::Tool::Tailwind;
|
||||
|
||||
if tailwind.is_installed() {
|
||||
@@ -196,11 +196,11 @@ pub fn build(config: &CrateConfig, quiet: bool) -> Result<BuildResult> {
|
||||
args.push("--minify");
|
||||
}
|
||||
|
||||
tailwind.call("tailwind-css", args)?;
|
||||
tailwind.call("tailwindcss", args)?;
|
||||
}
|
||||
} else {
|
||||
log::warn!(
|
||||
"Tailwind tool not found, you can use `dioxus tool add tailwind-css` to install it."
|
||||
"Tailwind tool not found, you can use `dioxus tool add tailwindcss` to install it."
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -459,7 +459,7 @@ pub fn gen_page(config: &DioxusConfig, serve: bool) -> String {
|
||||
&style.to_str().unwrap(),
|
||||
))
|
||||
}
|
||||
if config.application.tools.clone().unwrap_or_default().contains_key("tailwind-css") {
|
||||
if config.application.tools.clone().unwrap_or_default().contains_key("tailwindcss") {
|
||||
style_str.push_str("<link rel=\"stylesheet\" href=\"tailwind.css\">\n");
|
||||
}
|
||||
html = html.replace("{style_include}", &style_str);
|
||||
|
||||
+3
-3
@@ -19,7 +19,7 @@ pub enum Tool {
|
||||
}
|
||||
|
||||
pub fn tool_list() -> Vec<&'static str> {
|
||||
vec!["binaryen", "sass", "tailwind-css"]
|
||||
vec!["binaryen", "sass", "tailwindcss"]
|
||||
}
|
||||
|
||||
pub fn app_path() -> PathBuf {
|
||||
@@ -56,7 +56,7 @@ impl Tool {
|
||||
match name {
|
||||
"binaryen" => Some(Self::Binaryen),
|
||||
"sass" => Some(Self::Sass),
|
||||
"tailwind-css" => Some(Self::Tailwind),
|
||||
"tailwindcss" => Some(Self::Tailwind),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
@@ -66,7 +66,7 @@ impl Tool {
|
||||
match self {
|
||||
Self::Binaryen => "binaryen",
|
||||
Self::Sass => "sass",
|
||||
Self::Tailwind => "tailwind-css",
|
||||
Self::Tailwind => "tailwindcss",
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user