UNPKG

@softwareventures/maintain-project

Version:

Automatically create and maintain TypeScript projects with standard settings for Software Ventures Limited

11 lines 579 B
import { mapNullableFn } from "@softwareventures/nullable"; import { mapResultFn, toNullable } from "../result/result.js"; import { readProjectJson } from "../project/read-json.js"; export async function readProjectScript(project, scriptName) { return (readProjectJson(project, "package.json") // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access .then(mapResultFn(packageJson => packageJson?.scripts?.[scriptName])) .then(toNullable) .then(mapNullableFn(script => String(script)))); } //# sourceMappingURL=read-script.js.map