optimizations

This commit is contained in:
2026-03-28 19:15:39 +01:00
parent 0b25d9570a
commit cab4fbd83e
509 changed files with 1016804 additions and 1605 deletions

35
tests/e2e/global-setup.ts Normal file
View File

@@ -0,0 +1,35 @@
import { execFileSync } from 'node:child_process'
import { existsSync } from 'node:fs'
import path from 'node:path'
const VITE_MANIFEST_PATH = path.join(process.cwd(), 'public', 'build', 'manifest.json')
function ensureCompiledAssets() {
if (existsSync(VITE_MANIFEST_PATH)) {
return
}
const npmCommand = process.platform === 'win32' ? 'npm.cmd' : 'npm'
execFileSync(npmCommand, ['run', 'build'], {
cwd: process.cwd(),
stdio: 'inherit',
})
}
function warmBladeViews() {
execFileSync('php', ['artisan', 'view:clear'], {
cwd: process.cwd(),
stdio: 'inherit',
})
execFileSync('php', ['artisan', 'view:cache'], {
cwd: process.cwd(),
stdio: 'inherit',
})
}
export default async function globalSetup() {
ensureCompiledAssets()
warmBladeViews()
}