feat(es/plugin): Make quote optional (#4160)

This commit is contained in:
Donny/강동윤 2022-03-25 20:16:06 +09:00 committed by GitHub
parent e79aa965cd
commit 5de31416be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 2 deletions

View File

@ -8,14 +8,21 @@ name = "swc_plugin"
repository = "https://github.com/swc-project/swc.git"
version = "0.37.0"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[features]
quote = ["swc_ecma_quote"]
[dependencies]
swc_atoms = { version = "0.2.0", path = "../swc_atoms" }
swc_common = { version = "0.17.0", path = "../swc_common", features = [
"plugin-mode",
] }
swc_ecma_ast = { version = "0.73.0", path = "../swc_ecma_ast", features = [
"rkyv-impl",
] }
swc_ecma_quote = { version = "0.8.0", path = "../swc_ecma_quote", optional = true }
swc_ecma_visit = { version = "0.59.0", path = "../swc_ecma_visit" }
swc_atoms = { version = "0.2.0", path = "../swc_atoms" }
swc_plugin_macro = { version = "0.3.0", path = "../swc_plugin_macro" }
swc_ecma_quote = { version = "0.8.0", path = "../swc_ecma_quote" }

View File

@ -1,3 +1,5 @@
#![cfg_attr(docsrs, feature(doc_cfg))]
// Reexports
pub use swc_common::{
chain,
@ -6,6 +8,8 @@ pub use swc_common::{
pub mod util {
pub use swc_common::util::take;
#[cfg(feature = "swc_ecma_quote")]
#[cfg_attr(docsrs, doc(cfg(feature = "quote")))]
pub use swc_ecma_quote::*;
}