diff --git a/index.ts b/index.ts index 4fb9ed5..87fe093 100644 --- a/index.ts +++ b/index.ts @@ -66,10 +66,10 @@ function writeTemplate( statusOutput('Creating template'); const bundler = new Bundler(join(SRC_DIR, 'template.html'), BUNDLER_OPTIONS); - console.log((bundler as any)); await bundler.bundle(); statusOutput('Compiling HTML template'); + Handlebars.registerPartial('accounts', readFileSync(join(SRC_DIR, 'accounts.html')).toString()); const template = Handlebars.compile( readFileSync(join(BUILD_DIR, 'template.html')).toString() ); diff --git a/src/accounts.html b/src/accounts.html new file mode 100644 index 0000000..e14e87d --- /dev/null +++ b/src/accounts.html @@ -0,0 +1,13 @@ +
+
+
+ {{#each accounts }} +
+ + {{ name }} logo + +
+ {{/each}} +
+
+
diff --git a/src/template.html b/src/template.html index 7589191..55567f9 100644 --- a/src/template.html +++ b/src/template.html @@ -1,34 +1,22 @@ - - - - - + + + + +
-
-

-

You should give me money. Here's how:

-

- -

-
-
- -
-
- {{#list accounts }} -
- - {{ name }} logo - -
- {{/list}} -
+

+

You should give me money. Here's how:

+

+ +

+ {{> accounts }} +