Add versioning and harden deploy caching (v0.2.0)
Versioning: - package.json is the single source of the version (0.2.0); the build injects it into the landing page and Storybook via src/version.ts - Add CHANGELOG.md and a release section in the README Deploy: - Refuse to deploy uncommitted work unless --allow-dirty is passed - Stamp each deploy with version.json and verify the live stamp - Serve HTML and JSON with Cache-Control: no-cache and cache only the content-hashed assets/ folders long-term - Return 404 for missing assets instead of index.html, which blanked the Storybook canvas for browsers holding a stale page - Always restore the hardened .htaccess, even when a step fails - Make the post-deploy PHP-off check real, build Storybook before checking for its index, and stop logging the session token
This commit is contained in:
1 parent
9d406d6d2a
commit
dc5e6ff800
10 files changed
+224
-52
No files matched your search
+3
-2
@@ -14,6 +14,7 @@ import { Switch } from './components/Switch'
|
||||
import { Tooltip } from './components/Tooltip'
|
||||
import { documentation, featured, totalStories, type FeaturedName } from './data/catalogue'
|
||||
import { applyPalette } from './theme/applyPalette'
|
||||
import { VERSION } from './version'
|
||||
import { palettes, DEFAULT_PALETTE, type PaletteName } from './theme/palettes'
|
||||
|
||||
const STORYBOOK = '/docs/'
|
||||
@@ -239,7 +240,7 @@ function App() {
|
||||
<div className="hero-copy">
|
||||
<p className="eyebrow">
|
||||
<span>React component kit</span>
|
||||
<span className="eyebrow-dim">v0.2 · {documentation.length} parts · {totalStories} stories</span>
|
||||
<span className="eyebrow-dim">v{VERSION} · {documentation.length} parts · {totalStories} stories</span>
|
||||
</p>
|
||||
<h1>
|
||||
Small parts,
|
||||
@@ -362,7 +363,7 @@ function App() {
|
||||
<div className="footer-brand">
|
||||
<TansyMark size={24} />
|
||||
<span>
|
||||
<strong>Tansy UI</strong> · a React component kit by OpenKhalix
|
||||
<strong>Tansy UI</strong> v{VERSION} · a React component kit by OpenKhalix
|
||||
</span>
|
||||
</div>
|
||||
<nav className="footer-nav" aria-label="Footer">
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
import { Meta } from '@storybook/addon-docs/blocks'
|
||||
import { TansyMark } from './brand/TansyMark'
|
||||
import { documentation, totalStories } from './data/catalogue'
|
||||
import { VERSION } from './version'
|
||||
|
||||
<Meta title="Welcome" />
|
||||
|
||||
@@ -9,7 +10,7 @@ import { documentation, totalStories } from './data/catalogue'
|
||||
<div>
|
||||
<div style={{ fontFamily: '"Schibsted Grotesk", sans-serif', fontWeight: 800, fontSize: 40, letterSpacing: '-0.04em', lineHeight: 1 }}>Tansy <span style={{ fontSize: 40, fontWeight: 700, color: '#6b7384' }}>UI</span></div>
|
||||
<div style={{ fontFamily: '"JetBrains Mono", monospace', fontSize: 12, letterSpacing: '0.06em', textTransform: 'uppercase', color: '#6b7384', marginTop: 6 }}>
|
||||
React component kit · {documentation.length} parts · {totalStories} stories
|
||||
v{VERSION} · React component kit · {documentation.length} parts · {totalStories} stories
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
declare const __TANSY_VERSION__: string
|
||||
|
||||
/** The package version, injected from package.json at build time by vite.config.ts. */
|
||||
export const VERSION: string = __TANSY_VERSION__
|
||||
Reference in new issue
Block a user