From 07820dbf7af693b3d70aa1ad7d1cfde86cf254af Mon Sep 17 00:00:00 2001 From: Aaron Dill <117116764+aarondill@users.noreply.github.com> Date: Wed, 1 Feb 2023 11:30:29 -0600 Subject: [PATCH] docs: update usage in README (#290) * refactor: update readme * docs: change language in examples to console --- README.md | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 763111c8..2d6e460f 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ npm install --global sort-package-json ### Usage -```bash +```console $ cd my-project $ cat package.json { @@ -39,6 +39,9 @@ $ cat package.json $ npx sort-package-json package.json is sorted! +Found 1 file. +1 file successfully sorted. + $ cat package.json { "name": "my-awesome-project", @@ -62,17 +65,19 @@ $ sort-package-json "package.json" "packages/*/package.json" When you want to check if your files are sorted, you can run CLI with the `--check` flag (or `-c`). This will output a list of not sorted files, if any. -```bash +```console $ sort-package-json "**/package.json" --check -# 5 matched files are sorted. - +Found 5 files. +5 files were already sorted. $ sort-package-json "**/package.json" --check -# foo/package.json -# bar/package.json +foo/package.json +bar/package.json -# 2 of 5 matched files are not sorted. +Found 5 files. +3 files were not sorted. +2 files were already sorted. ``` #### `--quiet` flag