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
// Only include napi crates if we are building for node
#[cfg(feature = "node")]
extern crate napi;
#[cfg(feature = "node")]
extern crate napi_derive;

// Same for wasm
#[cfg(feature = "wasm")]
extern crate serde_wasm_bindgen;
#[cfg(feature = "wasm")]
extern crate wasm_bindgen;

// Also only include our napi modules if we build for node
#[cfg(any(feature = "node", feature = "wasm"))]
mod bindings;

#[cfg(feature = "node")]
pub use bindings::napi as napi_bindings;

#[cfg(feature = "wasm")]
pub use bindings::wasm as wasm_bindings;

// External crates we use
extern crate error_chain;
extern crate flange_flat_tree;
extern crate getrandom;
extern crate regex;
extern crate serde;
extern crate serde_json;
extern crate svg;
extern crate svgtypes;

pub mod config;
mod diff;
mod errors;
mod svg_data;

pub use svg_data::print_svg;
pub use svg_data::SVG;

pub use self::diff::diff;
pub use self::diff::diff_from_strings;
pub use self::diff::diffs;
pub use self::diff::DiffStep;