mirror of
https://github.com/tabler/tabler.git
synced 2026-08-27 12:36:28 +04:00
Let docs build without waiting for the preview pages
- preview's asset build is its own turbo task, cached on its own inputs - docs depends on that task instead of the whole preview build - full turbo build: 17.0s -> 13.4s
This commit is contained in:
@@ -121,6 +121,9 @@ export default defineConfig({
|
||||
from: path('./tmp-assets'),
|
||||
to: path('./public/preview'),
|
||||
label: '@tabler/preview',
|
||||
// Built by the separate "assets" script (its own turbo task), so this
|
||||
// build can start with a half-written tmp-assets from an aborted run.
|
||||
requiredFile: path('./tmp-assets/css/demo.css'),
|
||||
},
|
||||
{
|
||||
// static assets (photos, avatars, tracks, brand svgs...). The real source,
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"watch": "concurrently \"pnpm run watch-css\" \"pnpm run watch-js\"",
|
||||
"dev": "concurrently -n astro,css,js -c blue,magenta,cyan \"astro dev\" \"pnpm run watch-css\" \"pnpm run watch-js\"",
|
||||
"dev-prepare": "pnpm run assets",
|
||||
"build": "pnpm run assets && astro build",
|
||||
"build": "astro build",
|
||||
"preview": "astro preview",
|
||||
"clean": "shx rm -rf dist public/dist public/preview public/css .astro tmp-assets",
|
||||
"import-icons": "pnpm up @tabler/icons@latest && node .build/import-icons.mjs",
|
||||
|
||||
+18
-4
@@ -19,9 +19,23 @@
|
||||
],
|
||||
"cache": true
|
||||
},
|
||||
"@tabler/preview#assets": {
|
||||
"inputs": [
|
||||
"scss/**",
|
||||
"js/**",
|
||||
".build/vite.config.mts",
|
||||
"$TURBO_ROOT$/.build/build-css.ts",
|
||||
"$TURBO_ROOT$/.build/vite.config.helper.ts"
|
||||
],
|
||||
"outputs": [
|
||||
"tmp-assets/**"
|
||||
],
|
||||
"cache": true
|
||||
},
|
||||
"@tabler/preview#build": {
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
"^build",
|
||||
"@tabler/preview#assets"
|
||||
],
|
||||
"inputs": [
|
||||
"$TURBO_DEFAULT$",
|
||||
@@ -29,14 +43,14 @@
|
||||
],
|
||||
"outputs": [
|
||||
"dist/**",
|
||||
"demo/**",
|
||||
"tmp-assets/**"
|
||||
"demo/**"
|
||||
],
|
||||
"cache": true
|
||||
},
|
||||
"@tabler/docs#build": {
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
"@tabler/core#build",
|
||||
"@tabler/preview#assets"
|
||||
],
|
||||
"inputs": [
|
||||
"$TURBO_DEFAULT$",
|
||||
|
||||
Reference in New Issue
Block a user