[workspace] members = [ "node", "napi", "selectors", "c", "derive", "static-self", "static-self-derive", ] [package] authors = ["GiveMe-A-Name "] name = "lightningcss_rs" version = "0.1.0" description = "A CSS parser, transformer, and minifier fork from https://github.com/parcel-bundler/lightningcss. Fix some bug for Rspack." license = "MPL-2.0" edition = "2021" keywords = ["CSS", "minifier", "Parcel"] repository = "https://github.com/GiveMe-A-Name/lightningcss" [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"] [[bin]] name = "lightningcss" path = "src/main.rs" required-features = ["cli"] [lib] name = "lightningcss" path = "src/lib.rs" crate-type = ["rlib"] [features] default = ["bundler", "grid", "nodejs", "sourcemap"] browserslist = ["browserslist-rs"] bundler = ["dashmap", "sourcemap", "rayon"] cli = ["atty", "clap", "serde_json", "browserslist", "jemallocator"] grid = [] jsonschema = ["schemars", "serde", "parcel_selectors/jsonschema"] nodejs = ["dep:serde"] serde = [ "dep:serde", "smallvec/serde", "cssparser/serde", "parcel_selectors/serde", "into_owned", ] sourcemap = ["parcel_sourcemap"] visitor = [] into_owned = [ "static-self", "static-self/smallvec", "parcel_selectors/into_owned", ] substitute_variables = ["visitor", "into_owned"] [dependencies] serde = { version = "1.0.201", features = ["derive"], optional = true } cssparser = "0.33.0" cssparser-color = "0.1.0" parcel_selectors = { version = "0.27.0", path = "./selectors" } itertools = "0.10.1" smallvec = { version = "1.7.0", features = ["union"] } bitflags = "2.2.1" parcel_sourcemap = { version = "2.1.1", features = ["json"], optional = true } data-encoding = "2.3.2" lazy_static = "1.4.0" const-str = "0.3.1" pathdiff = "0.2.1" ahash = "0.8.7" paste = "1.0.12" # CLI deps atty = { version = "0.2", optional = true } clap = { version = "3.0.6", features = ["derive"], optional = true } browserslist-rs = { version = "0.16.0", optional = true } 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.43", path = "./derive" } schemars = { version = "0.8.19", features = ["smallvec"], optional = true } static-self = { version = "0.1.0", path = "static-self", optional = true } [target.'cfg(target_os = "macos")'.dependencies] jemallocator = { version = "0.3.2", features = [ "disable_initial_exec_tls", ], optional = true } [target.'cfg(target_arch = "wasm32")'.dependencies] getrandom = { version = "0.2", features = ["custom"], default-features = false } [dev-dependencies] indoc = "1.0.3" assert_cmd = "2.0" assert_fs = "1.0" predicates = "2.1" serde_json = "1" pretty_assertions = "1.4.0" [[test]] name = "cli_integration_tests" path = "tests/cli_integration_tests.rs" required-features = ["cli"] [[example]] name = "custom_at_rule" required-features = ["visitor"] [[example]] name = "serialize" required-features = ["serde"] [profile.release] lto = true codegen-units = 1 panic = 'abort'