mirror of
https://github.com/codeninjasgg/code-sensei.git
synced 2024-11-27 09:45:39 -05:00
16 lines
400 B
TypeScript
16 lines
400 B
TypeScript
import { walk } from "https://deno.land/std/fs/mod.ts";
|
|
|
|
interface Config {
|
|
template: string;
|
|
}
|
|
|
|
export default async function (config: Config): Promise<void> {
|
|
let templatePath = "";
|
|
for await (const entry of walk("./templates/")) {
|
|
if (entry.path.replace(/\\+/g, "/").includes(config.template)) {
|
|
templatePath = entry.path;
|
|
break;
|
|
}
|
|
}
|
|
console.log({ templatePath });
|
|
}
|