Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 679 Bytes

12800.md

File metadata and controls

19 lines (12 loc) · 679 Bytes

Add --cache and --cache-strategy CLI option (#12800 by @sosukesuzuki)

Two new CLI options have been added for a caching system similar to ESLint's one.

--cache

When you want to format only changed files, you can run Prettier with --cache flag. Enabling this flag can dramatically improve running time.

prettier --write --cache src
--cache-strategy

Strategy for the cache to use for detecting changed files. Can be either metadata or content. If no strategy is specified, metadata will be used.

prettier --write --cache --cache-strategy content src