extroonie.com/scripts/format.mjs
Extroonie 68e2c30928
Some checks failed
Check site / build (push) Has been cancelled
feat: initial commit
2026-09-21 12:31:51 -07:00

19 lines
414 B
JavaScript

import { spawnSync } from 'node:child_process';
const result = spawnSync(
process.execPath,
[
'node_modules/prettier/bin/prettier.cjs',
...process.argv.slice(2),
'assets/**/*.{css,js}',
'scripts/*.mjs',
'*.json',
'*.yaml',
'.github/workflows/*.yml',
'.prettierrc.json',
'layouts/**/*.html',
],
{ stdio: 'inherit' },
);
if (result.error) throw result.error;
process.exit(result.status ?? 1);