diff --git a/examples/clang-format/README.md b/examples/clang-format/README.md index 57f7bff..20b8de0 100644 --- a/examples/clang-format/README.md +++ b/examples/clang-format/README.md @@ -1,23 +1,55 @@ -# `clang-format` Example +# `examples-clang-format` -This `clang-format` example is provided to showcase the features included in `clang-format`. +This example demonstrates the features included in `clang-format`. To see which commands are available, check the `scripts` property in `package.json`. -## Running a Command - -For example, to run the `unformatted:cpp:dry-run` command: - -- From the root directory (`/`) - - ```bash - npm run unformatted:cpp:dry-run -w examples/clang-format - ``` - -- From the `examples/clang-format` directory (`/examples/clang-format`) - - ```bash - cd examples/clang-format - - npm run unformatted:cpp:dry-run - ``` +## Getting Started + +You can run the example by choosing one of the following two methods. + +### Run from the Root + +You can start the example by running the following commands from the root directory: + +```sh +npm run formatted:c -w examples/clang-format +# or +npm run formatted:c:dry-run -w examples/clang-format +# or +npm run formatted:cpp -w examples/clang-format +# or +npm run formatted:cpp:dry-run -w examples/clang-format +# or +npm run unformatted:c -w examples/clang-format +# or +npm run unformatted:c:dry-run -w examples/clang-format +# or +npm run unformatted:cpp -w examples/clang-format +# or +npm run unformatted:cpp:dry-run -w examples/clang-format +``` + +### Navigate to the Directory and Run + +Navigate to the `examples/clang-format` directory and then run the following commands to start the example: + +```sh +cd examples/clang-format + +npm run formatted:c +# or +npm run formatted:c:dry-run +# or +npm run formatted:cpp +# or +npm run formatted:cpp:dry-run +# or +npm run unformatted:c +# or +npm run unformatted:c:dry-run +# or +npm run unformatted:cpp +# or +npm run unformatted:cpp:dry-run +```