I am following this medium post .
Running the command prettier --write ./src/**/*.{js,jsx,scss}
works perfectly fine on windows machine.
However, when using Mac machine, this command doesn't go recursively on files that present on sub-folders.
What is the difference between windows and mac on this?
You could use find with -exec, like so
find src -iname \*.js -or -iname \*.jsx -exec prettier --write {} \;
The arguments:
Before you execute it, you could prepend echo to preview what commands will be running, like so
find src -iname \*.js -or -iname \*.jsx -exec echo prettier --write {} \;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.