UNPKG

@softwareventures/maintain-project

Version:

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

13 lines 630 B
import { mapFailureFn, success } from "../result/result.js"; import { readProjectScript } from "../npm/read-script.js"; import { yarn } from "./yarn.js"; export async function yarnFix(project) { return yarn(project, "fix").then(mapFailureFn(() => ({ type: "yarn-fix-failed", path: project.path }))); } export async function yarnFixIfAvailable(project) { return isYarnFixAvailable(project).then(async (available) => available ? yarnFix(project) : success()); } export async function isYarnFixAvailable(project) { return readProjectScript(project, "fix").then(script => script != null); } //# sourceMappingURL=fix.js.map