mirror of
https://github.com/tabler/tabler.git
synced 2026-10-12 05:06:55 +04:00
Show the version in the footer on preview.tabler.io (#3025)
This commit is contained in:
1 parent
670d63eb1a
commit
9efa76a334
3 files changed
+34
-83
No files matched your search
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@tabler/preview": patch
|
||||
---
|
||||
|
||||
Fixed the footer on `preview.tabler.io` to show the version link instead of the `Generated` build stamp.
|
||||
@@ -3,8 +3,10 @@ import Icon from '@ui/Icon.astro'
|
||||
import { site } from '@shared/lib/site'
|
||||
import { formatUtcTimestamp } from '@shared/lib/date-format'
|
||||
|
||||
// Set to "preview" on the branch deploys, same as robots.txt and sitemap.xml.
|
||||
const environment = process.env.NODE_ENV || 'production'
|
||||
// Vercel sets VERCEL_ENV to "production" on preview.tabler.io and to "preview"
|
||||
// on branch deploys. Only branch deploys get the build stamp next to the
|
||||
// version; production and local/packaged builds stay byte-stable.
|
||||
const isBranchDeploy = process.env.VERCEL_ENV === 'preview'
|
||||
|
||||
const now = new Date()
|
||||
---
|
||||
@@ -41,16 +43,11 @@ const now = new Date()
|
||||
<a href="." class="link-secondary">{site.title}</a>. All rights reserved.
|
||||
</li>
|
||||
<li class="list-inline-item">
|
||||
{
|
||||
environment === 'preview' ? (
|
||||
`Generated ${formatUtcTimestamp(now)}`
|
||||
) : (
|
||||
<a href="./changelog.html" class="link-secondary" rel="noopener">
|
||||
v{site.version}
|
||||
</a>
|
||||
)
|
||||
}
|
||||
<a href="./changelog.html" class="link-secondary" rel="noopener">
|
||||
v{site.version}
|
||||
</a>
|
||||
</li>
|
||||
{isBranchDeploy && <li class="list-inline-item">Generated {formatUtcTimestamp(now)}</li>}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+21
-72
@@ -1,62 +1,28 @@
|
||||
{
|
||||
"$schema": "https://turbo.build/schema.json",
|
||||
"globalEnv": [
|
||||
"NODE_ENV",
|
||||
"NEXT_PUBLIC_POSTHOG_KEY",
|
||||
"NEXT_PUBLIC_POSTHOG_HOST",
|
||||
"DOCSEARCH_API_KEY",
|
||||
"DOCSEARCH_APP_ID",
|
||||
"DOCSEARCH_INDEX_NAME"
|
||||
],
|
||||
"globalEnv": ["NODE_ENV", "VERCEL_ENV", "NEXT_PUBLIC_POSTHOG_KEY", "NEXT_PUBLIC_POSTHOG_HOST", "DOCSEARCH_API_KEY", "DOCSEARCH_APP_ID", "DOCSEARCH_INDEX_NAME"],
|
||||
"tasks": {
|
||||
"build": {
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
],
|
||||
"outputs": [
|
||||
"dist/**"
|
||||
],
|
||||
"dependsOn": ["^build"],
|
||||
"outputs": ["dist/**"],
|
||||
"cache": true
|
||||
},
|
||||
"@tabler/preview#build": {
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
],
|
||||
"inputs": [
|
||||
"$TURBO_DEFAULT$",
|
||||
"$TURBO_ROOT$/shared/**"
|
||||
],
|
||||
"outputs": [
|
||||
"dist/**",
|
||||
"tmp-assets/**"
|
||||
],
|
||||
"dependsOn": ["^build"],
|
||||
"inputs": ["$TURBO_DEFAULT$", "$TURBO_ROOT$/shared/**"],
|
||||
"outputs": ["dist/**", "tmp-assets/**"],
|
||||
"cache": true
|
||||
},
|
||||
"@tabler/docs#build": {
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
],
|
||||
"inputs": [
|
||||
"$TURBO_DEFAULT$",
|
||||
"$TURBO_ROOT$/shared/**"
|
||||
],
|
||||
"outputs": [
|
||||
"dist/**",
|
||||
"tmp-assets/**"
|
||||
],
|
||||
"dependsOn": ["^build"],
|
||||
"inputs": ["$TURBO_DEFAULT$", "$TURBO_ROOT$/shared/**"],
|
||||
"outputs": ["dist/**", "tmp-assets/**"],
|
||||
"cache": true
|
||||
},
|
||||
"@tabler/screenshots#build": {
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
],
|
||||
"inputs": [
|
||||
"$TURBO_DEFAULT$",
|
||||
"$TURBO_ROOT$/shared/**"
|
||||
],
|
||||
"outputs": [
|
||||
"dist/**"
|
||||
],
|
||||
"dependsOn": ["^build"],
|
||||
"inputs": ["$TURBO_DEFAULT$", "$TURBO_ROOT$/shared/**"],
|
||||
"outputs": ["dist/**"],
|
||||
"cache": true
|
||||
},
|
||||
"dev": {
|
||||
@@ -67,56 +33,39 @@
|
||||
"cache": false
|
||||
},
|
||||
"@tabler/preview#dev:prepare": {
|
||||
"dependsOn": [
|
||||
"@tabler/core#dev:prepare"
|
||||
],
|
||||
"dependsOn": ["@tabler/core#dev:prepare"],
|
||||
"cache": false
|
||||
},
|
||||
"@tabler/core#dev": {
|
||||
"dependsOn": [
|
||||
"@tabler/core#dev:prepare"
|
||||
],
|
||||
"dependsOn": ["@tabler/core#dev:prepare"],
|
||||
"cache": false,
|
||||
"persistent": true
|
||||
},
|
||||
"@tabler/preview#dev": {
|
||||
"dependsOn": [
|
||||
"@tabler/preview#dev:prepare"
|
||||
],
|
||||
"dependsOn": ["@tabler/preview#dev:prepare"],
|
||||
"cache": false,
|
||||
"persistent": true
|
||||
},
|
||||
"@tabler/screenshots#dev": {
|
||||
"dependsOn": [
|
||||
"@tabler/core#dev:prepare"
|
||||
],
|
||||
"dependsOn": ["@tabler/core#dev:prepare"],
|
||||
"cache": false,
|
||||
"persistent": true
|
||||
},
|
||||
"@tabler/docs#dev": {
|
||||
"dependsOn": [
|
||||
"@tabler/core#dev:prepare",
|
||||
"@tabler/preview#dev:prepare"
|
||||
],
|
||||
"dependsOn": ["@tabler/core#dev:prepare", "@tabler/preview#dev:prepare"],
|
||||
"cache": false,
|
||||
"persistent": true
|
||||
},
|
||||
"clean": {
|
||||
"dependsOn": [
|
||||
"^clean"
|
||||
],
|
||||
"dependsOn": ["^clean"],
|
||||
"cache": false
|
||||
},
|
||||
"bundlewatch": {
|
||||
"dependsOn": [
|
||||
"build"
|
||||
],
|
||||
"dependsOn": ["build"],
|
||||
"cache": true
|
||||
},
|
||||
"type-check": {
|
||||
"dependsOn": [
|
||||
"^type-check"
|
||||
],
|
||||
"dependsOn": ["^type-check"],
|
||||
"cache": true
|
||||
},
|
||||
"test": {
|
||||
@@ -130,4 +79,4 @@
|
||||
"cache": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user