rust-cookbook/build.rs

15 lines
362 B
Rust
Raw Normal View History

2017-02-20 11:22:19 -08:00
extern crate skeptic;
2017-02-25 01:52:30 -06:00
use std::fs;
2017-02-20 11:22:19 -08:00
fn main() {
let paths = fs::read_dir("./src/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<_>>();
2017-02-25 01:52:30 -06:00
skeptic::generate_doc_tests(&paths[..]);
2017-02-20 11:22:19 -08:00
}