commit
722e5b4477
12
README.md
12
README.md
|
@ -97,13 +97,19 @@ Run prettier through the CLI with this script. Run it without any
|
|||
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. In the future we
|
||||
will have better support for formatting whole projects.
|
||||
should probably commit your code before doing that.
|
||||
|
||||
```js
|
||||
prettier <opts> <filename>
|
||||
prettier [opts] [filename ...]
|
||||
```
|
||||
|
||||
For example, you could format your source using bash filename expansion:
|
||||
```bash
|
||||
prettier --write src/**/*.js bin/*.js
|
||||
```
|
||||
|
||||
In the future we will have better support for formatting whole projects.
|
||||
|
||||
### API
|
||||
|
||||
The API is a single function exported as `format`. The options
|
||||
|
|
|
@ -17,7 +17,7 @@ const write = argv["write"];
|
|||
|
||||
if (!filenames.length) {
|
||||
console.log(
|
||||
"Usage: prettier [opts] [filename]\n\n" +
|
||||
"Usage: prettier [opts] [filename ...]\n\n" +
|
||||
"Available options:\n" +
|
||||
" --write Edit the file in-place (beware!)\n" +
|
||||
" --print-width <int> Specify the length of line that the printer will wrap on. Defaults to 80.\n" +
|
||||
|
|
Loading…
Reference in New Issue