[package]
name = "stylua"
version = "0.18.2"
authors = ["JohnnyMorganz <johnnymorganz@outlook.com>"]
description = "A code formatter for Lua"
license = "MPL-2.0"
repository = "https://github.com/johnnymorganz/stylua"
readme = "README.md"
categories = ["command-line-utilities", "development-tools"]
keywords = ["cli", "utility", "lua", "lua51", "formatter"]
edition = "2018"
exclude = ["stylua-vscode/**", "tests/**"]

[lib]
name = "stylua_lib"
path = "src/lib.rs"
crate-type = ["cdylib", "rlib"]
bench = false

[[bin]]
name = "stylua"
path = "src/cli/main.rs"
bench = false

[features]
default = ["editorconfig", "wasm-bindgen"]
serialize = []
fromstr = ["strum"]
luau = ["full_moon/roblox"]
lua52 = ["full_moon/lua52"]
lua53 = ["lua52", "full_moon/lua53"]
lua54 = ["lua53", "full_moon/lua54"]
editorconfig = ["ec4rs"]

[dependencies]
anyhow = "1.0.75"
cfg-if = "1.0.0"
clap = { version = "3.1.6", features = ["derive"] }
console = "0.15.7"
crossbeam-channel = "0.5.8"
ec4rs = { version = "1.0.2", optional = true }
env_logger = { version = "0.10.0", default-features = false }
full_moon = "0.18.1"
globset = "0.4.10"
ignore = "0.4.20"
lazy_static = "1.4.0"
log = "0.4.19"
num_cpus = "1.16.0"
regex = "1.9.1"
serde = "1.0.179"
serde_json = "1.0.105"
similar = { version = "2.2.1", features = ["text", "inline", "serde"] }
strum = { version = "0.25.0", features = ["derive"], optional = true }
thiserror = "1.0.48"
threadpool = "1.8.1"
toml = "0.7.6"

[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = { version = "0.2.81", optional = true }

[dev-dependencies]
criterion = "0.4.0"
insta = { version = "1.12.0", features = ["glob"] }
assert_cmd = "2.0.4"

[[bench]]
name = "date"
harness = false

[[bench]]
name = "nested_tables"
harness = false

[[bench]]
name = "docgen"
harness = false
