Skip to content

Commit 8c29e03

Browse files
committed
Add some comments.
1 parent 2c4f8f8 commit 8c29e03

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

tools/compare/compare.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
// Author: Ron B. Yeh
2-
2+
// MIT License
33
// See: https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API
44

5+
// To generate current/ and reference/ images, follow these steps:
6+
// `git checkout` a stable "reference" version of VexFlow (e.g., a recent release).
7+
// `grunt reference` builds VexFlow and copies the build/ to the reference/ folder
8+
// `git checkout` the new branch you are working on.
9+
// `grunt` builds your latest "current" version.
10+
// `grunt generate:current`
11+
// `grunt generate:reference`
12+
// Now you can use this tool to compare the current/ and reference/ images.
13+
514
// store a reference to our file handle
615
let fileHandle;
716

@@ -241,3 +250,10 @@ function updateLabelsForViewMode() {
241250
}
242251
}
243252
}
253+
254+
function showInfoTemporarily() {
255+
document.getElementById('info').style.display = 'block';
256+
setTimeout(() => {
257+
document.getElementById('info').style.display = 'none';
258+
}, 6500);
259+
}

tools/compare/index.html

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<html>
33
<head>
44
<script src="compare.js"></script>
5+
<meta name="author" content="Ron B. Yeh" />
56
<style>
67
body {
78
font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
@@ -78,6 +79,12 @@
7879
color: #ddd;
7980
z-index: 10;
8081
}
82+
83+
#info {
84+
background-color: #444;
85+
color: #bbb;
86+
padding: 20px;
87+
}
8188
</style>
8289
<script>
8390
document.addEventListener('DOMContentLoaded', () => {
@@ -90,7 +97,17 @@
9097
<a href="#" onclick="openTheFolder()"
9198
>Click here to open the <b><code>vexflow/build/images/</code></b> folder</a
9299
>
93-
(the one which contains <code>current/, diff/, reference/</code>).
100+
(the one which contains <code>current/, diff/, reference/</code>). [<a
101+
href="#"
102+
onclick="showInfoTemporarily(); return false;"
103+
title="Use commands like `grunt reference`, `grunt generate:current`, and `grunt generate:reference` to generate the necessary images."
104+
>
105+
? </a
106+
>]
107+
</p>
108+
<p id="info" style="display: none">
109+
Use commands like `grunt reference`, `grunt generate:current`, and `grunt generate:reference` to generate the
110+
necessary images.
94111
</p>
95112
<p>If a "Let site view files?" pop-up appears, choose <b>View Files</b>.</p>
96113
<p>

0 commit comments

Comments
 (0)