Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions demo/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"lint": "tsc --noEmit"
},
"dependencies": {
"@marvinackerman/tablecraft": "3.0.0",
"@marvinackerman/tablecraft": "3.1.0",
"@tanstack/react-table": "^8.21.3",
"@tanstack/react-virtual": "^3.13.25",
"prism-react-renderer": "^2.4.0",
Expand Down
5 changes: 4 additions & 1 deletion demo/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Hero } from './Hero'
import { TABLECRAFT_VERSION } from './version'
import { WhySection } from './sections/WhySection'
import { CoreSection } from './sections/CoreSection'
import { EditingSection } from './sections/EditingSection'
Expand All @@ -17,7 +18,9 @@ export default function App() {
tablecraft<span className="text-accent">.</span>
</span>
<div className="flex items-center gap-4 text-sm">
<span className="hidden font-mono text-xs text-faint sm:inline">v2.5.0 · MIT</span>
<span className="hidden font-mono text-xs text-faint sm:inline">
v{TABLECRAFT_VERSION} · MIT
</span>
<a
className="text-muted transition-colors hover:text-ink"
href="https://github.com/Marvinkwame/Tablecraft"
Expand Down
3 changes: 2 additions & 1 deletion demo/src/Hero.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useState } from 'react'
import { buttonClasses } from './ui/Button'
import { TABLECRAFT_VERSION } from './version'

const INSTALL = 'npm i @marvinackerman/tablecraft @tanstack/react-table'

Expand Down Expand Up @@ -30,7 +31,7 @@ export function Hero() {
>
<span className="size-1.5 rounded-full bg-emerald-400" />
@marvinackerman/tablecraft
<span className="text-faint">v2.5.0</span>
<span className="text-faint">v{TABLECRAFT_VERSION}</span>
</p>

<h1
Expand Down
12 changes: 12 additions & 0 deletions demo/src/version.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import pkg from '../package.json'

/**
* The tablecraft version this demo actually installs, read from the demo's own
* package.json rather than typed in by hand.
*
* The badge was hardcoded and sat at v2.5.0 across three releases while the
* dependency moved on without it. Deriving it means the displayed version and
* the installed one cannot disagree: bumping the dependency is now the only
* thing needed to update the page.
*/
export const TABLECRAFT_VERSION = pkg.dependencies['@marvinackerman/tablecraft']
Loading