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');
|
statusOutput('Creating template');
|
||||||
const bundler = new Bundler(join(SRC_DIR, 'template.html'), BUNDLER_OPTIONS);
|
const bundler = new Bundler(join(SRC_DIR, 'template.html'), BUNDLER_OPTIONS);
|
||||||
console.log((bundler as any));
|
|
||||||
await bundler.bundle();
|
await bundler.bundle();
|
||||||
|
|
||||||
statusOutput('Compiling HTML template');
|
statusOutput('Compiling HTML template');
|
||||||
|
Handlebars.registerPartial('accounts', readFileSync(join(SRC_DIR, 'accounts.html')).toString());
|
||||||
const template = Handlebars.compile(
|
const template = Handlebars.compile(
|
||||||
readFileSync(join(BUILD_DIR, 'template.html')).toString()
|
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>
|
|
@ -1,34 +1,22 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" href="../node_modules/@fortawesome/fontawesome-free/scss/fontawesome.scss" />
|
<link rel="stylesheet" href="../node_modules/@fortawesome/fontawesome-free/scss/fontawesome.scss" />
|
||||||
<link rel="stylesheet" href="../node_modules/animate.css/animate.min.css" />
|
<link rel="stylesheet" href="../node_modules/animate.css/animate.min.css" />
|
||||||
<link rel="stylesheet" href="./index.scss" />
|
<link rel="stylesheet" href="./index.scss" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="jumbotron mb-0 jumbotron-fluid text-center vertical-center">
|
<div class="jumbotron mb-0 jumbotron-fluid text-center vertical-center">
|
||||||
<div class="container">
|
|
||||||
<h1 class="display-1"></h1>
|
|
||||||
<p class="lead">You should give me money. Here's how:</p>
|
|
||||||
<h1>
|
|
||||||
<i class="fas fa-chevron-down mt-5 animated infinite slideInDown"></i>
|
|
||||||
</h1>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="jumbotron mb-0 jumbotron-fluid">
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="card-deck">
|
<h1 class="display-1"></h1>
|
||||||
{{#list accounts }}
|
<p class="lead">You should give me money. Here's how:</p>
|
||||||
<div class="card text-center mx-5">
|
<h1>
|
||||||
<a href="{{ link }}" class="colour-invert">
|
<i class="fas fa-chevron-down mt-5 animated infinite slideInDown"></i>
|
||||||
<img src="{{ image }}" class="card-img-top my-3 mx-3" alt="{{ name }} logo" style="max-width:40%" />
|
</h1>
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
{{/list}}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{> accounts }}
|
||||||
|
|
||||||
<script type="text/javascript" src="../node_modules/bootstrap/js/src/index.js"></script>
|
<script type="text/javascript" src="../node_modules/bootstrap/js/src/index.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Reference in a new issue