mirror of
https://github.com/LucasVbr/LucasVbr.git
synced 2026-05-14 01:21:52 +00:00
Generate README.md with Deno and nunjucks
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import denjucks from "https://deno.land/x/denjucks/mod.js";
|
||||
|
||||
let { template, data, output } = JSON.parse(await Deno.readTextFile("src/config.json"));
|
||||
|
||||
template = await Deno.readTextFile(template);
|
||||
data = JSON.parse(await Deno.readTextFile(data));
|
||||
|
||||
const result = denjucks.renderString(template, data);
|
||||
await Deno.writeTextFile(output, result);
|
||||
Reference in New Issue
Block a user