Supply a list of files and they will be prettified in-place using prettier. If you want to then minify them, use babili-inplace or uglify-inplace
npm install -g pretty-inplace
Supply a list of files and they will be prettified. For example, the following will overwrite index.js with a prettified version.
pretty-inplace index.js
You can also use wildcards. It will only prettify Javascript files ending in .js and ignore other files. For example, to prettify all javascipt files in the current directory:
pretty-inplace ./*