UNPKG

@softwareventures/maintain-project

Version:

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

15 lines 510 B
import yaml from "yaml"; import { readTemplateText } from "./read-text.js"; export async function readTemplateYamlAsDocument(templateId, path, ...pathSegments) { return readTemplateText(templateId, path, ...pathSegments) .then(text => yaml.parseDocument(text)) .then(document => { if (document.errors.length === 0) { return document; } else { throw new Error("Invalid Template YAML"); } }); } //# sourceMappingURL=read-yaml.js.map