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
This commit is contained in:
1 parent
3f6259554e
commit
74b6466ee7
1 file changed
+7
-1
@@ -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"
|
||||
|
||||
Reference in new issue
Block a user