Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
19 changes: 10 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ name = "lightningcss"
path = "src/lib.rs"
crate-type = ["rlib"]

[features]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved the feature flags up since they're commonly found above the dependencies section.
When evaluating a crate I find it nice to be able to quickly see what features I can turn off.

Happy to move them back if you prefer!

default = ["bundler", "grid"]
browserslist = ["browserslist-rs"]
bundler = ["dashmap", "rayon"]
cli = ["clap", "serde_json", "browserslist", "jemallocator"]
grid = []
serde = ["smallvec/serde", "cssparser/serde"]

[dependencies]
serde = { version = "1.0.123", features = ["derive"] }
cssparser = "0.29.1"
Expand All @@ -41,8 +49,8 @@ pathdiff = "0.2.1"
# CLI deps
clap = { version = "3.0.6", features = ["derive"], optional = true }
browserslist-rs = { version = "0.7.0", optional = true }
rayon = "1.5.1"
dashmap = "5.0.0"
rayon = { version = "1.5.1", optional = true }
dashmap = { version = "5.0.0", optional = true }
serde_json = { version = "1.0.78", optional = true }
lightningcss-derive = { version = "1.0.0-alpha.35", path = "./derive" }

Expand All @@ -56,13 +64,6 @@ assert_fs = "1.0"
predicates = "2.1"
serde_json = "1"

[features]
default = ["grid"]
browserslist = ["browserslist-rs"]
cli = ["clap", "serde_json", "browserslist", "jemallocator"]
grid = []
serde = ["smallvec/serde", "cssparser/serde"]

[[test]]
name = "cli_integration_tests"
path = "tests/cli_integration_tests.rs"
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#![deny(missing_docs)]

#[cfg(feature = "bundler")]
pub mod bundler;
mod compat;
mod context;
Expand Down