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