From 280e70b37965797a41944ee876438176d98ca51a Mon Sep 17 00:00:00 2001 From: Till Höppner Date: Sat, 20 Feb 2016 01:33:54 +0100 Subject: Add passthrough option --- example/Cargo.toml | 6 ++++-- example/build.rs | 13 +++++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) (limited to 'example') 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(); } -- cgit v1.2.3