mdoc 0.3.0

Modern PDF creation through Markdown and LaTeX
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use anyhow::{Context, Result};
use mdoc::utils::data_dir;
use std::fs::remove_dir_all;

pub fn clean(data: bool) -> Result<()> {
    if data {
        remove_dir_all(data_dir()).context("Could not remove data directory.")?;
        mdoc::success!("Data directory removed.");
    } else {
        mdoc::info!("MDoc does not support cleaning the project folder yet.");
    }

    Ok(())
}