cargo-modoc

Crates.iocargo-modoc
lib.rscargo-modoc
version1.2.0
sourcesrc
created_at2019-02-27 09:48:11.060213
updated_at2020-03-27 12:09:18.932815
descriptionGenerate module documentation from markdown files
homepagehttps://github.com/kurtlawrence/cargo-modoc
repositoryhttps://github.com/kurtlawrence/cargo-modoc
max_upload_size
id117539
size9,044
Kurt Lawrence (kurtlawrence)

documentation

https://docs.rs/cargo-modoc/

README

Build Status Latest Version Rust Documentation codecov

Generate Rust module documentation from markdown files.

Apply module documentation to a source file from a markdown file. This binary takes a markdown file and prepends a source file with the module documentation comments (//!). There is a configuration file at the root directory (modoc.config) which defines which markdown files are to prepend which source files, in a single input multiple output fashion.

To get started, use cargo to install the binary.

cargo install cargo-modoc

A configuration file needs to be set up.

# Commends are allowed
"README.md" = [ "src/main.rs", "src/lib.rs" ]

A single markdown file can apply to multiple source files.

Run the binary to write the markdown contents to the source files.

cargo modoc

The binary will read the contents of the markdown file and prepend the source file with the line comments (//!). If there are any lines in the source file which start with //! then these lines are not included (hence the documentation is overwritten).

Commit count: 10

cargo fmt