rust-cookbook/build.rs
2017-02-25 12:19:20 -06:00

14 lines
358 B
Rust

extern crate skeptic;
use std::fs;
fn main() {
let paths = fs::read_dir("./pages/").unwrap()
// convert paths to Strings
.map(|p| p.unwrap().path().to_str().unwrap().to_string())
// only compile markdown files
.filter(|p| p.ends_with(".md"))
.collect::<Vec<_>>();
skeptic::generate_doc_tests(&paths[..]);
}