UNPKG

@softwareventures/maintain-project

Version:

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

10 lines 521 B
import { formatIdeaXml } from "../idea/format-idea-xml.js"; import { readTemplateXml } from "./read-xml.js"; export async function modifyTemplateXml({ templateId, pathSegments, modify }) { const dom = readTemplateXml(templateId, ...pathSegments); const newDom = dom.then(modify); const newXmlText = newDom.then(formatIdeaXml); const data = newXmlText.then(newXmlText => new TextEncoder().encode(newXmlText)); return data.then(data => ({ type: "file", data })); } //# sourceMappingURL=modify-xml.js.map