Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor and polish the source code of the library #29

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
link the main.rs doc to the README
this commit is here to make the maintainance of the doc easier:
change the README and bam, the doc of the `nufmt` binary is up-to-date!
  • Loading branch information
amtoine committed Jun 16, 2023
commit d172e0103e2ca6731bbee42d605c1d929291a08b
38 changes: 1 addition & 37 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,40 +1,4 @@
//! This is the nufmt binary documentation
//!
//! # Usage
//!
//! ```text
//! nufmt [OPTIONS] [FILES] ...
//! ```
//! ## Files
//!
//! `Files` are a list of files. It cannot be used combined with `--stdin`.
//! You can format many files with one command!. For example:
//!
//! ```text
//! nufmt my-file1.nu my-file2.nu my-file3.nu
//! ```
//!
//! ## Options
//!
//! - `-s` or `--stdin` formats from `stdin`, returns to `stdout` as a String. It cannot be used combined with `files`.
//!
//! - `-c` or `--config` pass the config file path.
//!
//! Sample:
//!
//! ```text
//! nufmt <files> --config my-config.json
//! ```
//!
//! or
//!
//! ```text
//! nufmt --stdin <string> --config my-stdin-config.json
//! ```
//!
//! - `-h` or `--help` show help and exit
//!
//! - `-v` or `--version` prints the version and exit
#![doc = include_str!("../README.md")]

use anyhow::{Ok, Result};
use clap::Parser;
Expand Down