Skip to content

Commit 526e7b5

Browse files
committed
Add version to site
1 parent 0b81350 commit 526e7b5

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

packages/xd-crossword-tools/src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@ export type { Puz2JSONResult } from "./vendor/puzjs"
1212
export { runLinterForClue } from "./xdLints"
1313
export { amuseToXD } from "./amuseJSONToXD"
1414
export { validateClueAnswersMatchGrid } from "./validateClueAnswersMatchGrid"
15+
16+
// Export the package version
17+
import packageJson from "../package.json"
18+
export const version = packageJson.version

tsconfig.base.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"lib": ["es2020", "dom"],
88
"noEmit": true,
99
"moduleResolution": "node",
10+
"resolveJsonModule": true,
1011
"esModuleInterop": true,
1112
"declaration": true,
1213
"sourceMap": true,

website/src/Homepage.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import { convertToCrosswordFormat } from "./utils/convertToCrosswordFormat"
2727
import { CrosswordBarPreview } from "./components/CrosswordPreview"
2828
import { readmeHtml } from "virtual:readme"
2929
import { Link } from "wouter"
30+
import { version } from "xd-crossword-tools"
3031

3132
function App() {
3233
const { crosswordJSON, lastFileContext, setXD, validationReports, cursorInfo } = use(RootContext)
@@ -431,7 +432,7 @@ function App() {
431432
<Navbar.Brand className={`brand-title ${isMobile ? "mobile-brand" : ""}`}>
432433
XD Crossword Tools
433434
<Badge bg="primary" className={`ms-2 version-badge ${isMobile ? "d-none" : ""}`}>
434-
playground
435+
v{version}
435436
</Badge>
436437
</Navbar.Brand>
437438
<div className={`header-subtitle ${isMobile ? "d-none" : ""}`}>Interactive crossword format converter and editor</div>

0 commit comments

Comments
 (0)