mirror of
https://github.com/geoffsee/open-gsio.git
synced 2025-09-08 22:56:46 +00:00
fix build
This commit is contained in:
@@ -5,7 +5,10 @@
|
||||
"dev": "bun vite dev",
|
||||
"build": "bun vite build",
|
||||
"tests": "vitest run",
|
||||
"tests:coverage": "vitest run --coverage.enabled=true"
|
||||
"tests:coverage": "vitest run --coverage.enabled=true",
|
||||
"generate:sitemap": "bun ./scripts/generate_sitemap.js open-gsio.seemueller.workers.dev",
|
||||
"generate:robotstxt": "bun ./scripts/generate_robots_txt.js open-gsio.seemueller.workers.dev",
|
||||
"generate:fonts": "cp -r ../../node_modules/katex/dist/fonts public/static"
|
||||
},
|
||||
"dependencies": {
|
||||
"@open-gsio/env": "workspace:*",
|
||||
@@ -48,6 +51,8 @@
|
||||
"vike": "0.4.193",
|
||||
"vite": "^6.3.5",
|
||||
"vite-plugin-pwa": "^1.0.0",
|
||||
"vitest": "^3.1.4"
|
||||
"vitest": "^3.1.4",
|
||||
"bun": "*",
|
||||
"@types/bun": "*"
|
||||
}
|
||||
}
|
||||
|
@@ -5,20 +5,18 @@ import * as child_process from "node:child_process";
|
||||
import {VitePWA} from 'vite-plugin-pwa';
|
||||
import { configDefaults } from 'vitest/config';
|
||||
|
||||
const APP_FQDN = "open-gsio.seemueller.workers.dev";
|
||||
|
||||
export default defineConfig(({command}) => {
|
||||
const customPlugins = [
|
||||
{
|
||||
name: "sitemap-generator",
|
||||
buildStart(options) {
|
||||
if (command === "build") {
|
||||
child_process.execSync("./scripts/generate_sitemap.js " + APP_FQDN);
|
||||
child_process.execSync("bun run generate:sitemap");
|
||||
console.log("Generated Sitemap -> public/sitemap.xml");
|
||||
child_process.execSync("./scripts/generate_robots_txt.js " + APP_FQDN);
|
||||
child_process.execSync("bun run generate:robotstxt");
|
||||
console.log("Generated robots.txt -> public/robots.txt");
|
||||
child_process.execSync("cp -r ../../node_modules/katex/dist/fonts public/static");
|
||||
console.log("Copied KaTeX fonts -> public/static/fonts");
|
||||
child_process.execSync("bun run generate:fonts");
|
||||
console.log("Copied fonts -> public/static/fonts");
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@@ -17,6 +17,8 @@ find . -name ".wrangler" -type d -prune -exec rm -rf {} \;
|
||||
find . -name "dist" -type d -prune -exec rm -rf {} \;
|
||||
find . -name "build" -type d -prune -exec rm -rf {} \;
|
||||
|
||||
find . -name "fonts" -type d -prune -exec rm -rf {} \;
|
||||
|
||||
# Remove coverage directories
|
||||
find . -name "coverage" -type d -prune -exec rm -rf {} \;
|
||||
find . -name "html" -type d -prune -exec rm -rf {} \;
|
||||
|
Reference in New Issue
Block a user