Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: split rustywind into multiple crates so that it can also be made available as a library #100

Merged
merged 8 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/rustfmt.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# When pushed to master, run `cargo +nightly fmt --all` and open a PR.
name: rustfmt
on: [push, pull_request]
jobs:
rustfmt:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install stable toolchain with rustfmt available
uses: actions-rs/toolchain@v1
Expand All @@ -15,4 +14,4 @@ jobs:
override: true
components: rustfmt

- run: rustfmt --edition 2021 **/*.rs --check
- run: cargo fmt --check -- --edition 2021
98 changes: 61 additions & 37 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

66 changes: 17 additions & 49 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,63 +1,31 @@
[package]
[workspace]
members = ["rustywind-cli", "rustywind-core", "rustywind-vite"]
default-members = ["rustywind-cli"]
resolver = "2"

[workspace.package]
authors = ["Praveen Perera <praveen@avencera.com>"]
edition = "2021"
license = "Apache-2.0"
name = "rustywind"
version = "0.21.1"
homepage = "https://github.com/avencera/rustywind"
repository = "https://github.com/avencera/rustywind"
documentation = "https://docs.rs/rustywind"
description = "A CLI to sort tailwind CSS classes"

[package.metadata.binstall]
pkg-url = "{ repo }/releases/download/v{ version }/{ name }-v{ version }-{ target }.tar.gz"
bin-dir = "{ bin }{ binary-ext }"
pkg-fmt = "tgz"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
# cli
clap = { version = "4.3", features = ["cargo", "derive", "unstable-styles"] }
indoc = "2.0"
colored = "2.1"

# files
ignore = "0.4"

# utils
itertools = "0.12"
[workspace.dependencies]
once_cell = "1.18"

# string matching
aho-corasick = "1.0"
regex = "1.9"

# logging
env_logger = "0.11"
log = "0.4"

# faster hashmap
itertools = "0.12"
# Faster HashMap
ahash = "0.8"

# parallel
rayon = "1.5"

# http
ureq = "2.9"

# errors
color-eyre = "0.6"
# Errors
eyre = "0.6"

# json parsing
serde = {version = "1.0", features = ["derive"]}
serde_json = "1.0"
color-eyre = "0.6"
# Logging
env_logger = "0.11"
log = "0.4"
# TLS
rustls = { version = "0.22" }
anstyle = "1.0.1"

[dev-dependencies]
pretty_assertions = "1.4"
# HTTP
ureq = "2.9"

[profile.release]
codegen-units = 1
Expand Down
41 changes: 41 additions & 0 deletions rustywind-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[package]
name = "rustywind"
version = "0.21.1"
description = "A CLI to sort tailwind CSS classes"
documentation = "https://docs.rs/rustywind"
authors.workspace = true
edition.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

[package.metadata.binstall]
pkg-url = "{ repo }/releases/download/v{ version }/{ name }-v{ version }-{ target }.tar.gz"
bin-dir = "{ bin }{ binary-ext }"
pkg-fmt = "tgz"

[dependencies]
rustywind_core = { path = "../rustywind-core" }
rustywind_vite = { path = "../rustywind-vite" }

itertools = { workspace = true }
regex = { workspace = true }
once_cell = { workspace = true }
ahash = { workspace = true }
eyre = { workspace = true }
color-eyre = { workspace = true }
env_logger = { workspace = true }
log = { workspace = true }

# CLI
clap = { version = "4.3", features = ["cargo", "derive", "unstable-styles"] }
indoc = "2.0"
colored = "2.1"
# Parallel
rayon = "1.5"
# Files
ignore = "0.4"
# JSON parsing
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
anstyle = "1.0.1"
File renamed without changes.
Loading
Loading