@softwareventures/maintain-project
Version:
Automatically create and maintain TypeScript projects with standard settings for Software Ventures Limited
14 lines • 603 B
JavaScript
import { readProjectJson } from "../project/read-json.js";
import { mapResultFn } from "../result/result.js";
import { textFile } from "../fs-stage/file.js";
import { formatPackageJson } from "./format-package-json.js";
export async function modifyPackageJson(project,
// FIXME Use type-fest PackageJson type
// eslint-disable-next-line @typescript-eslint/no-explicit-any
modify) {
return readProjectJson(project, "package.json")
.then(mapResultFn(modify))
.then(mapResultFn(formatPackageJson))
.then(mapResultFn(textFile));
}
//# sourceMappingURL=modify-package-json.js.map