@softwareventures/maintain-project
Version:
Automatically create and maintain TypeScript projects with standard settings for Software Ventures Limited
12 lines • 552 B
JavaScript
import { relative, sep } from "path";
import { mapFn } from "@softwareventures/array";
import recursiveReadDir from "recursive-readdir";
import { templatePath } from "./template.js";
export async function listTemplateFiles(templateId, ...pathSegments) {
const directoryPath = templatePath(templateId, ...pathSegments);
return recursiveReadDir(directoryPath)
.then(mapFn(path => relative(directoryPath, path)))
.then(mapFn(path => path.split(sep)))
.then(mapFn(path => path.join("/")));
}
//# sourceMappingURL=list.js.map