readme-rustdocifier 0.1.1

A library for rustdocifying `README.md` for inclusion in `lib.rs`
Documentation
#[path = "src/inner.rs"]
mod readme_rustdocifier;

use std::{env, error::Error, fs, path::PathBuf};

// ======================================================================
// CONST

const CRATE_NAME: &str = "readme_rustdocifier";

// ======================================================================
// MAIN

fn main() -> Result<(), Box<dyn Error>> {
    println!("cargo:rerun-if-changed=README.md");
    fs::write(
        PathBuf::from(env::var("OUT_DIR")?).join("README-rustdocified.md"),
        readme_rustdocifier::rustdocify(
            &fs::read_to_string("README.md")?,
            &env::var("CARGO_PKG_NAME")?,
            Some(&env::var("CARGO_PKG_VERSION")?),
            Some(CRATE_NAME),
        )?,
    )?;
    Ok(())
}