aboutsummaryrefslogtreecommitdiff
path: root/src/templates.ts
diff options
context:
space:
mode:
authorKevin J Hoerr <kjhoerr@protonmail.com>2022-04-04 01:13:14 +0000
committerKevin J Hoerr <kjhoerr@protonmail.com>2022-04-04 01:13:14 +0000
commita87eb1608d354a6e9c8170e0fdc432a5f556c445 (patch)
treea36a9342bd53ce3c8df3885cc342f3b6d5f16aa4 /src/templates.ts
parentaa045248645094e77d529bd6d048ff83619c352e (diff)
downloadao-coverage-a87eb1608d354a6e9c8170e0fdc432a5f556c445.tar.gz
ao-coverage-a87eb1608d354a6e9c8170e0fdc432a5f556c445.tar.bz2
ao-coverage-a87eb1608d354a6e9c8170e0fdc432a5f556c445.zip
Refactor dependency on env and add comments
Diffstat (limited to 'src/templates.ts')
-rw-r--r--src/templates.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/templates.ts b/src/templates.ts
index 648bb56..26451cf 100644
--- a/src/templates.ts
+++ b/src/templates.ts
@@ -1,6 +1,9 @@
import handlebars from "handlebars";
import fs from "fs";
+/**
+ * Information for processing a template file into the output file
+ */
export interface Template {
inputFile: string;
outputFile: string;
@@ -8,6 +11,9 @@ export interface Template {
data?: string;
}
+/**
+ * Process input file and produce file at given output location
+ */
export default async (_template: Template): Promise<Template> => {
const buffer = await fs.promises.readFile(_template.inputFile, "utf-8");