From dbcda1525d9541a31592287b2a24b506692dfabe Mon Sep 17 00:00:00 2001 From: Rafael de Oleza Date: Fri, 29 Jun 2012 20:04:13 +0200 Subject: [PATCH] Update Readme file with info about env vars --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 5eb9b89..f64cac5 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,16 @@ and they'll be automatically displayed in a clearer way: If you install the package globally (with `npm install -g prettyjson`), the CLI will be installed automatically in your PATH thanks to npm. +### Customizing colors via command line + +Now it's possible to customize the colors of the output via environment variables, thanks to @bahamas10: + +```bash +$ PRETTYJSON_KEYS=red PRETTYJSON_DASH=blue bin/prettyjson package.json +``` + +The available options are `PRETTYJSON_KEYS`, `PRETTYJSON_DASH` and `PRETTYJSON_INDENT`. + ## Using it (from Node.js) It's pretty easy to use it... you just have to include it in your script and call the `render()` method: