1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// With the new split of tinted-builder-rust (cli) and
// tinted-builder (lib), tinted-builder is exported here for backward
// compatibility for a time. Everyone should move to using
// tinted-builder as the rust library.
#[doc = include_str!("../README.md")]

mod operations {
    pub mod build;
}
mod utils;

pub use crate::operations::build as operation_build;

/// Add tinted-builder library test since tinted-builder-rust is exporting the structs
///
/// ```
/// use tinted_builder_rust::{Scheme, Template};
///
/// let template = String::from(r#"/* Some CSS file with {{scheme-name}} theme */
/// .someCssSelector { background-color: #{{base00-hex}} }
/// .someOtherCssSelector { background-color: #{{base0F-hex}} }"#);
/// let scheme_str = r#"system: "base16"
/// name: "UwUnicorn"
/// author: "Fernando Marques (https://github.com/RakkiUwU) and Gabriel Fontes (https://github.com/Misterio77)"
/// variant: "dark"
/// palette:
///   base00: "241b26"
///   base01: "2f2a3f"
///   base02: "46354a"
///   base03: "6c3cb2"
///   base04: "7e5f83"
///   base05: "eed5d9"
///   base06: "d9c2c6"
///   base07: "e4ccd0"
///   base08: "877bb6"
///   base09: "de5b44"
///   base0A: "a84a73"
///   base0B: "c965bf"
///   base0C: "9c5fce"
///   base0D: "6a9eb5"
///   base0E: "78a38f"
///   base0F: "a3a079""#;
/// let scheme = Scheme::Base16(serde_yaml::from_str(&scheme_str).unwrap());
/// let template = Template::new(template, scheme);
/// let output = template
///     .render()
///     .unwrap();
///
///  assert_eq!(output, r#"/* Some CSS file with UwUnicorn theme */
/// .someCssSelector { background-color: #241b26 }
/// .someOtherCssSelector { background-color: #a3a079 }"#);
/// ```
pub use tinted_builder::{Base16Scheme, Scheme, Template, TintedBuilderError};