Skip to content

Latest commit

 

History

History
20 lines (16 loc) · 451 Bytes

watching-files.md

File metadata and controls

20 lines (16 loc) · 451 Bytes
id watching-files
title Watching For Changes

You can have Prettier watch for changes from the command line by using onchange. For example:

npx onchange "**/*" -- npx prettier --write --ignore-unknown {{changed}}

Or add the following to your package.json:

{
  "scripts": {
    "prettier-watch": "onchange \"**/*\" -- prettier --write --ignore-unknown {{changed}}"
  }
}