16 lines
518 B
JavaScript
16 lines
518 B
JavaScript
|
/** @type {(parser: string, ps: string[]) => import("bun").Subprocess} */
|
||
|
const prettier = (parser, ps) =>
|
||
|
Bun.spawn(['bun', 'x', 'prettier', '--write', '--parser', parser, ...ps], {
|
||
|
stdout: 'inherit',
|
||
|
stderr: 'inherit',
|
||
|
})
|
||
|
|
||
|
const procs = [
|
||
|
prettier('babel', ['./index.js', './bun/**/*.js', './.prettierrc.cjs']),
|
||
|
prettier('json', ['./package.json', './jsconfig.json']),
|
||
|
prettier('html', ['./resume.html']),
|
||
|
prettier('css', ['./assets/iosevka.css']),
|
||
|
]
|
||
|
|
||
|
await Promise.all(procs.map(p => p.exited))
|