Environments:
- Prettier Version: 2.7.0
- Running Prettier via: CLI
- Operating System: Windows
After discussion #12800 (comment) you moved from default cache location .prettiercache (eslint style) to node_modules/.cache/prettier (ava style).
In #12800 (comment) you needed a use case for a --cache-location CLI param.
I have a script which formats and compiles many Visual Studio projects which shares one node_modules dir.
Compiling one project boosts the prettier call from 15s to 2s. 🎉
But every project has different files (surprise :-) so every prettier call finds new files and rebuilds (!) node_modules/.cache/prettier from scratch (which renders the cache useless in many situations).
It would be better if prettier would
- expand the cached cache file with new found files (but when do we cleanup?) or
- default to
.prettiercache to be able to have a cache file per vs project or
- readd
--cache-location CLI param so I can configure the cache in my build script
cc @sosukesuzuki @fisker @7rulnik
Environments:
After discussion #12800 (comment) you moved from default cache location
.prettiercache(eslint style) tonode_modules/.cache/prettier(ava style).In #12800 (comment) you needed a use case for a
--cache-locationCLI param.I have a script which formats and compiles many Visual Studio projects which shares one
node_modulesdir.Compiling one project boosts the prettier call from 15s to 2s. 🎉
But every project has different files (surprise :-) so every prettier call finds new files and rebuilds (!)
node_modules/.cache/prettierfrom scratch (which renders the cache useless in many situations).It would be better if prettier would
.prettiercacheto be able to have a cache file per vs project or--cache-locationCLI param so I can configure the cache in my build scriptcc @sosukesuzuki @fisker @7rulnik