diff options
author | Till Höppner | 2016-02-20 01:33:54 +0100 |
---|---|---|
committer | Till Höppner | 2016-02-20 01:33:54 +0100 |
commit | 280e70b37965797a41944ee876438176d98ca51a (patch) | |
tree | bd69cbf46a8587e42829eaa27dae10e71a0c43ea /example | |
parent | 6996b19389701c1c8809827ec4349172302f12b1 (diff) | |
download | includedir-280e70b37965797a41944ee876438176d98ca51a.tar.gz includedir-280e70b37965797a41944ee876438176d98ca51a.tar.xz includedir-280e70b37965797a41944ee876438176d98ca51a.zip |
Add passthrough option
Diffstat (limited to 'example')
-rw-r--r-- | example/Cargo.toml | 6 | ||||
-rw-r--r-- | example/build.rs | 13 |
2 files changed, 13 insertions, 6 deletions
diff --git a/example/Cargo.toml b/example/Cargo.toml index c7c6496..3d3cbd5 100644 --- a/example/Cargo.toml +++ b/example/Cargo.toml @@ -8,7 +8,9 @@ publish = false [dependencies] phf = "0.7.12" -includedir = "0.2.0" +# includedir = "0.2.0" +includedir = { path = "../lib" } [build-dependencies] -includedir_codegen = "0.2.0" +# includedir_codegen = "0.2.0" +includedir_codegen = { path = "../codegen" } diff --git a/example/build.rs b/example/build.rs index fb23001..c13f035 100644 --- a/example/build.rs +++ b/example/build.rs @@ -1,10 +1,15 @@ extern crate includedir_codegen; +use std::env; + use includedir_codegen::Compression; fn main() { - includedir_codegen::start("FILES") - .dir("data", Compression::Gzip) - .build("data.rs") - .unwrap(); + let mut cg = includedir_codegen::start("FILES"); + if env::var("PASSTHROUGH").is_ok() { + cg.passthrough(); + } + cg.dir("data", Compression::Gzip) + .build("data.rs") + .unwrap(); } |