Skip to content

Commit ecfd6dc

Browse files
committed
Move Pages test page to index.html
1 parent 73deb5e commit ecfd6dc

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

DEVELOPMENT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ python3 scripts/build_artifacts.py
1212

1313
This generates:
1414

15-
* `dist/test.html`
15+
* `dist/index.html`
1616
* A self-contained demo page built from `test/test.template.html`
1717
* Embeds the current `gadget/inline-datetime.js` and `gadget/inline-datetime.css`
1818
* `dist/mediawiki-export.xml`
@@ -29,7 +29,7 @@ This generates:
2929

3030
Edit `test/test.template.html` if you want to change the demo page structure or add more examples.
3131

32-
Do not manually edit `dist/test.html`. Rebuild it from the template instead.
32+
Do not manually edit `dist/index.html`. Rebuild it from the template instead.
3333

3434
## MediaWiki import workflow
3535

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This is a Mediawiki gadget for game wikis with a few game servers in different t
44

55
This gadget will format times and timespans as inline text with a tooltip (accessible on hover or tap) that translates the time to the user's local time. The information is kept minimal for compactness but expansion occurs as needed for precision.
66

7-
[Demo page](https://solidkalium.github.io/inline-datetime/test.html)
7+
[Demo page](https://solidkalium.github.io/inline-datetime/)
88

99
Example tooltip:
1010

scripts/build_artifacts.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ def build_test_page(dist_dir: Path) -> Path:
139139
js = indent_block(read_text(ROOT / "gadget" / "inline-datetime.js").rstrip(), " ")
140140
interactive_cases = render_test_cases(interactive=True)
141141
fallback_cases = render_test_cases(interactive=False)
142-
test_output = dist_dir / "test.html"
142+
test_output = dist_dir / "index.html"
143+
legacy_output = dist_dir / "test.html"
143144

144145
output = (
145146
template
@@ -149,6 +150,8 @@ def build_test_page(dist_dir: Path) -> Path:
149150
.replace(TEST_CASES_FALLBACK_MARKER, fallback_cases)
150151
)
151152
write_text(test_output, output + "\n")
153+
if legacy_output.exists():
154+
legacy_output.unlink()
152155
return test_output
153156

154157

0 commit comments

Comments
 (0)