Skip to content

Commit d44ac50

Browse files
committed
Update readme
1 parent 4e78e28 commit d44ac50

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,15 @@ If it is passed a component path it will, by default, print the formatted compon
1111

1212
When passed a directory, `cfformat` always overwrites component files in place, and so it will ask for confirmation before proceeding. Here you can use the `--overwrite` flag to skip this confirmation check.
1313

14+
`cfformat` can also be called with a directory path and the `--watch` flag. When this is done, `cfformat` will use CommandBox's built in support for file watching to watch that directory for component changes, and will perform formatting passes on those files.
15+
16+
```bash
17+
cfformat ./ --watch
18+
```
19+
1420
## Settings
1521

16-
To see the settings used for formatting, use the `--settings` flag. When that is present the `cfformat` command will just dump to the console the settings it will use to format, and not perform any formatting:
22+
To see the settings used for formatting, use the `--settings` flag. When that is present the `cfformat` command will just dump the settings it will use to format to the console, and not perform any formatting:
1723

1824
```bash
1925
cfformat --settings
@@ -43,6 +49,13 @@ Specifying a settings file to use inline when running `cfformat` is done as foll
4349
cfformat path/to/my.cfc /path/to/.cfformat.json
4450
```
4551

52+
For more information on the settings used and what they do please see the [reference](reference.md). You can also print reference information to the console using the `settingInfo` argument. `settingInfo` can be passed either a full setting name, or just a prefix:
53+
54+
```bash
55+
cfformat settingInfo=array.padding
56+
cfformat settingInfo=array
57+
```
58+
4659
## Syntect
4760

4861
Behind the scenes, `cfformat` makes use of the [syntect](https://github.com/trishume/syntect) library along with syntax files from Sublime Text's [Packages](https://github.com/sublimehq/Packages) repository to create an executable that uses the CFML syntax for Sublime Text to generate syntax scopes for component files. `cfformat` attempts to download this executable from GitHub when installed, or when it is updated (if necessary). If it is unable to download the executable, it should print a message to the console prompting you to download from GitHub, and indicating where to put it. If you have Rust installed, you can also build the executable yourself by running the `build.cfc` task runner in the root of this repository:

0 commit comments

Comments
 (0)