* Sync README -> docs/options.md * Sync README -> docs/*.md * Misc fixups * Remove markdown-toc * Remove insert-pragma from ToC * Never again! * Move all docs to ./docs * Remove yarn toc * Fix inter-doc links * Fix links in footer * Clean up README.md * Add basic description to README.md * Use flat badges * Move editor guides to website * Improve prettier-ignore docs * Fixup bad find/replace * Add JSON to README * Fix custom parser API link * Fixup GitHub centering, add downloads badge * Add 1.8 docs * docs(website): mention markdown on homepage (#1) * Add intro * Add watching-files.md * Fix markdown syntax highlighting * Switch back to .md links
19 lines
440 B
Markdown
19 lines
440 B
Markdown
---
|
|
id: watching-files
|
|
title: Watching For Changes
|
|
---
|
|
|
|
If you prefer to have prettier watch for changes from the command line you can use a package like [onchange](https://www.npmjs.com/package/onchange). For example:
|
|
|
|
```
|
|
npx onchange '**/*.js' -- npx prettier --write {{changed}}
|
|
```
|
|
|
|
or add the following to your `package.json`
|
|
|
|
```json
|
|
"scripts": {
|
|
"prettier-watch": "onchange '**/*.js' -- prettier --write {{changed}}"
|
|
},
|
|
```
|