Closed GoldSubmarine closed 3 years ago
There is not currently that ability. Maybe the prettier-maven-plugin could be updated to accept a glob, and then the shell script could compute a glob representing modified files. Does that sound like it would work for you?
My main concern with the single-file approach is that launching a Maven process for each file has a lot of overhead
There is not currently that ability. Maybe the prettier-maven-plugin could be updated to accept a glob, and then the shell script could compute a glob representing modified files. Does that sound like it would work for you?
Yes, it is very helpful to me. I just want the --write
ability of prettier. And it uses the fast-glob library for supported glob syntax.
Is there any plan about this?
Sorry for the lengthy delay, I just merged #39 which should make this possible with via a command like:
mvn prettier:write -Dprettier.inputGlobs=src/main/java/my/package/MyClass.java
I'll release this as part of version 0.13 shortly
Thank you for your work.
prettier-java has the ability to format the single file
Can i use this plugin to format the single file via the command line?
My real needs is to register a git hook like this # option-6-shell-script