FIx syntax issue with parcel and handlebars
This commit is contained in:
parent
7d30d1900a
commit
81f61ccefd
3 changed files with 26 additions and 25 deletions
2
index.ts
2
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()
|
||||
);
|
||||
|
|
13
src/accounts.html
Normal file
13
src/accounts.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
<div class="jumbotron mb-0 jumbotron-fluid">
|
||||
<div class="container">
|
||||
<div class="card-deck">
|
||||
{{#each accounts }}
|
||||
<div class="card text-center mx-5">
|
||||
<a href="{{ link }}" class="colour-invert">
|
||||
<img src="{{ image }}" class="card-img-top my-3 mx-3" alt="{{ name }} logo" style="max-width:40%" />
|
||||
</a>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -15,19 +15,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="jumbotron mb-0 jumbotron-fluid">
|
||||
<div class="container">
|
||||
<div class="card-deck">
|
||||
{{#list accounts }}
|
||||
<div class="card text-center mx-5">
|
||||
<a href="{{ link }}" class="colour-invert">
|
||||
<img src="{{ image }}" class="card-img-top my-3 mx-3" alt="{{ name }} logo" style="max-width:40%" />
|
||||
</a>
|
||||
</div>
|
||||
{{/list}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{> accounts }}
|
||||
|
||||
<script type="text/javascript" src="../node_modules/bootstrap/js/src/index.js"></script>
|
||||
</body>
|
||||
|
|
Reference in a new issue