From 74b6466ee7bc542b56170207a8b732ac04fff388 Mon Sep 17 00:00:00 2001 From: Jed Watson Date: Mon, 6 Mar 2017 16:51:51 +1100 Subject: [PATCH] Add CLI Example to Readme (#909) Simple change to add a real world example of CLI usage, because it wasn't immediately obvious to me how it should actually look --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 73f91b468..7b31f9abc 100644 --- a/README.md +++ b/README.md @@ -113,10 +113,16 @@ arguments to see the options. To format a file in-place, use `--write`. While this is in beta you should probably commit your code before doing that. -```js +```bash prettier [opts] [filename ...] ``` +In practice, this may look something like: + +```bash +prettier --single-quote --trailing-comma es5 --write '{app,__{tests,mocks}__}/**/*.js' +``` + For easier cross-platform usage, prettier has built-in glob support: ```bash prettier --write "src/**/*.js" "bin/*.js"