This repository has been archived on 2026-07-27. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
aniwatch-api/scripts/format-package-json.js
T

16 lines
448 B
JavaScript

import { exec } from "child_process";
export function preCommit({ tag, version }) {
exec("jq --indent 4 . package.json > tmp.json && mv tmp.json package.json", (error, stdout, stderr) => {
if (error) {
console.error(`exec error: ${error}`);
return;
}
if (stderr) {
console.error(`stderr: ${stderr}`);
return;
}
console.log(`stdout: ${stdout}`);
});
}