From 3681318a78be603cdcf8ef064693ba339fa209e1 Mon Sep 17 00:00:00 2001 From: Matt Wade Date: Thu, 29 Oct 2020 11:52:02 -0600 Subject: [PATCH] Documents options / flags --- README.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/README.md b/README.md index a9f83f2..250ad32 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ deployed production code. - [Requirements](#requirements) - [Installation](#installation) - [Usage](#usage) + - [CLI Arguments and Options](#cli-arguments-and-options) - [Non-Interactive Mode Usage](#non-interactive-mode-usage) - [Interactive Mode Usage](#interactive-mode-usage) - [Clean Configuration](#clean-configuration) @@ -90,6 +91,50 @@ pass in the `-i` or `--interactive` flag. Run `ddp --help` to view more information. +### CLI Arguments and Options + +```shell +$ ddp [options] +``` + +#### Domain Argument + +The domain should be entered with the `http://` or `https://` protocol, and should +not have an ending slash. + +```shell +$ ddp http://example.com +``` + +Note that this argument is required unless in `--interactive` mode. + +#### Options + +Options / flags should be entered before the domain argument, and are detailed below: + +``` +-b, --build-dir=build-dir The directory of your built HTML files. Defaults to "build". + +-c, --clean-config=clean-config A JSON string, or a file path to a JSON file, to configure how the + HTML should be cleaned before it is diff'd. If "stdin" is passed, + piped input will be used as the clean config. If invalid JSON is + passed, the command exits early. See the DESCRIPTION section for + more information on this. + +-h, --help Show CLI help. + +-i, --interactive When true, will prompt for inputs it has not explicitly received. + Defaults to false. + +-o, --output=output The filename of the HTML diff report. If "stdout" is passed, the + unified diff string is echoed out. + +-q, --quiet When true, suppresses any progress messages that otherwise would be + logged out. Defaults to false. + +-v, --version Show CLI version. +``` + ### Non-Interactive Mode Usage Copy a folder of your entire site and paste it in the current working