Skip to content

Commit faa345e

Browse files
committed
show demo build count
1 parent a97de9e commit faa345e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

site/demo-kuto.ts

+12
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ export class DemoKutoElement extends HTMLElement {
88
private textarea: HTMLTextAreaElement;
99
private article: HTMLElement;
1010
private priors?: Map<string, string>;
11+
private buildCount: number = 0;
12+
private statusEl: HTMLElement;
1113

1214
constructor() {
1315
super();
@@ -56,12 +58,17 @@ article > pre {
5658
font-family: monospace;
5759
}
5860
}
61+
62+
#status {
63+
color: red;
64+
}
5965
</style>
6066
6167
<main>
6268
<header>
6369
<textarea></textarea>
6470
<button autofocus>Split with Kuto</button>
71+
<div id="status"></div>
6572
</header>
6673
<article></article>
6774
</main>
@@ -78,6 +85,8 @@ article > pre {
7885
}
7986
});
8087
this.textarea = textarea;
88+
89+
this.statusEl = this.root.getElementById('status')!;
8190
}
8291

8392
private async run(source: string) {
@@ -97,6 +106,9 @@ article > pre {
97106
const out = e.build({ pretty: true });
98107
console.info({ liftStats, out });
99108

109+
const localBuild = ++this.buildCount;
110+
this.statusEl.textContent = `Build #${localBuild}`;
111+
100112
this.article.textContent = '';
101113

102114
const render = (content: string, filename: string, className = '') => {

0 commit comments

Comments
 (0)