mirror of
https://github.com/codeninjasgg/code-sensei.git
synced 2024-11-30 11:07:10 -05:00
17 lines
400 B
TypeScript
17 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 });
|
||
|
}
|