From 0a35f9ce213a28af8c0c61ff4cd723d984e199d7 Mon Sep 17 00:00:00 2001 From: oyelowo Date: Fri, 17 Jan 2025 21:33:59 +0200 Subject: [PATCH] Reorg and move twust macro to a separate crate --- Cargo.toml | 6 ++++-- twust/Cargo.toml | 21 +++++++++++++++++++ {twust-macro => twust_macro}/Cargo.toml | 11 +++++----- .../src/config/classes.rs | 0 .../src/config/macros.rs | 0 .../src/config/mod.rs | 0 .../src/config/modifiers.rs | 0 .../src/config/noconfig.rs | 0 {twust-macro => twust_macro}/src/lib.rs | 0 .../src/plugins/daisyui.rs | 0 .../src/plugins/mod.rs | 0 .../src/tailwind/colorful.rs | 0 .../src/tailwind/default_classnames.rs | 0 .../src/tailwind/lengthy.rs | 0 .../src/tailwind/mod.rs | 0 .../src/tailwind/modifiers.rs | 0 .../src/tailwind/signable.rs | 0 .../src/tailwind/tailwind_config.rs | 0 .../src/tailwind/valid_baseclass_names.rs | 0 19 files changed, 30 insertions(+), 8 deletions(-) create mode 100644 twust/Cargo.toml rename {twust-macro => twust_macro}/Cargo.toml (71%) rename {twust-macro => twust_macro}/src/config/classes.rs (100%) rename {twust-macro => twust_macro}/src/config/macros.rs (100%) rename {twust-macro => twust_macro}/src/config/mod.rs (100%) rename {twust-macro => twust_macro}/src/config/modifiers.rs (100%) rename {twust-macro => twust_macro}/src/config/noconfig.rs (100%) rename {twust-macro => twust_macro}/src/lib.rs (100%) rename {twust-macro => twust_macro}/src/plugins/daisyui.rs (100%) rename {twust-macro => twust_macro}/src/plugins/mod.rs (100%) rename {twust-macro => twust_macro}/src/tailwind/colorful.rs (100%) rename {twust-macro => twust_macro}/src/tailwind/default_classnames.rs (100%) rename {twust-macro => twust_macro}/src/tailwind/lengthy.rs (100%) rename {twust-macro => twust_macro}/src/tailwind/mod.rs (100%) rename {twust-macro => twust_macro}/src/tailwind/modifiers.rs (100%) rename {twust-macro => twust_macro}/src/tailwind/signable.rs (100%) rename {twust-macro => twust_macro}/src/tailwind/tailwind_config.rs (100%) rename {twust-macro => twust_macro}/src/tailwind/valid_baseclass_names.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 85077fe..c55f5d8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [workspace] workspace.resolver = "2" -members = ["twust-macro", "tailwind"] +members = ["twust", "twust_macro", "tailwind"] [workspace.package] @@ -12,6 +12,7 @@ email = ["oyelowo.oss@gmai.com"] readme = "README.md" documentation = "https://docs.rs/nom" # documentation = "https://codebreather.com/oyelowo" +repository = "https://github.com/Oyelowo/twust" description = "Zero-config Static type-checker for Tailwind CSS" license = "MIT/Apache-2.0" categories = ["UI", "css", "tailwindcss", "web-programming"] @@ -34,7 +35,8 @@ keywords = [ [workspace.dependencies] -twust = { path = "twust-macro" } +twust = { path = "twust" } +twust_macro = { path = "twust_macro" } # tailwind = { path = "tailwind" } proc-macro2 = "1.0.69" diff --git a/twust/Cargo.toml b/twust/Cargo.toml new file mode 100644 index 0000000..001ce18 --- /dev/null +++ b/twust/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "twust" +version = { workspace = true } +edition = { workspace = true } +authors = { workspace = true } +documentation = { workspace = true } +description = { workspace = true } +license = { workspace = true } +repository = { workspace = true } +readme = { workspace = true } +keywords = { workspace = true } + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[features] +daisyui = [] + +[dependencies] +twust_macro = { workspace = true } + + diff --git a/twust-macro/Cargo.toml b/twust_macro/Cargo.toml similarity index 71% rename from twust-macro/Cargo.toml rename to twust_macro/Cargo.toml index f790d06..044e82e 100644 --- a/twust-macro/Cargo.toml +++ b/twust_macro/Cargo.toml @@ -1,15 +1,14 @@ [package] -name = "twust" +name = "twust_macro" version = { workspace = true } edition = { workspace = true } authors = { workspace = true } -# description = { workspace = true } documentation = { workspace = true } license = { workspace = true } -repository = "https://github.com/Oyelowo/twust" -description = "Static checker for tailwindcss class names in rust for rust" -readme = "../README.md" -keywords = ["tailwindcss", "tailwind", "css", "leptos", "yew"] +repository = { workspace = true } +description = { workspace = true } +readme = { workspace = true } +keywords = { workspace = true } # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/twust-macro/src/config/classes.rs b/twust_macro/src/config/classes.rs similarity index 100% rename from twust-macro/src/config/classes.rs rename to twust_macro/src/config/classes.rs diff --git a/twust-macro/src/config/macros.rs b/twust_macro/src/config/macros.rs similarity index 100% rename from twust-macro/src/config/macros.rs rename to twust_macro/src/config/macros.rs diff --git a/twust-macro/src/config/mod.rs b/twust_macro/src/config/mod.rs similarity index 100% rename from twust-macro/src/config/mod.rs rename to twust_macro/src/config/mod.rs diff --git a/twust-macro/src/config/modifiers.rs b/twust_macro/src/config/modifiers.rs similarity index 100% rename from twust-macro/src/config/modifiers.rs rename to twust_macro/src/config/modifiers.rs diff --git a/twust-macro/src/config/noconfig.rs b/twust_macro/src/config/noconfig.rs similarity index 100% rename from twust-macro/src/config/noconfig.rs rename to twust_macro/src/config/noconfig.rs diff --git a/twust-macro/src/lib.rs b/twust_macro/src/lib.rs similarity index 100% rename from twust-macro/src/lib.rs rename to twust_macro/src/lib.rs diff --git a/twust-macro/src/plugins/daisyui.rs b/twust_macro/src/plugins/daisyui.rs similarity index 100% rename from twust-macro/src/plugins/daisyui.rs rename to twust_macro/src/plugins/daisyui.rs diff --git a/twust-macro/src/plugins/mod.rs b/twust_macro/src/plugins/mod.rs similarity index 100% rename from twust-macro/src/plugins/mod.rs rename to twust_macro/src/plugins/mod.rs diff --git a/twust-macro/src/tailwind/colorful.rs b/twust_macro/src/tailwind/colorful.rs similarity index 100% rename from twust-macro/src/tailwind/colorful.rs rename to twust_macro/src/tailwind/colorful.rs diff --git a/twust-macro/src/tailwind/default_classnames.rs b/twust_macro/src/tailwind/default_classnames.rs similarity index 100% rename from twust-macro/src/tailwind/default_classnames.rs rename to twust_macro/src/tailwind/default_classnames.rs diff --git a/twust-macro/src/tailwind/lengthy.rs b/twust_macro/src/tailwind/lengthy.rs similarity index 100% rename from twust-macro/src/tailwind/lengthy.rs rename to twust_macro/src/tailwind/lengthy.rs diff --git a/twust-macro/src/tailwind/mod.rs b/twust_macro/src/tailwind/mod.rs similarity index 100% rename from twust-macro/src/tailwind/mod.rs rename to twust_macro/src/tailwind/mod.rs diff --git a/twust-macro/src/tailwind/modifiers.rs b/twust_macro/src/tailwind/modifiers.rs similarity index 100% rename from twust-macro/src/tailwind/modifiers.rs rename to twust_macro/src/tailwind/modifiers.rs diff --git a/twust-macro/src/tailwind/signable.rs b/twust_macro/src/tailwind/signable.rs similarity index 100% rename from twust-macro/src/tailwind/signable.rs rename to twust_macro/src/tailwind/signable.rs diff --git a/twust-macro/src/tailwind/tailwind_config.rs b/twust_macro/src/tailwind/tailwind_config.rs similarity index 100% rename from twust-macro/src/tailwind/tailwind_config.rs rename to twust_macro/src/tailwind/tailwind_config.rs diff --git a/twust-macro/src/tailwind/valid_baseclass_names.rs b/twust_macro/src/tailwind/valid_baseclass_names.rs similarity index 100% rename from twust-macro/src/tailwind/valid_baseclass_names.rs rename to twust_macro/src/tailwind/valid_baseclass_names.rs