diff --git a/bun.lockb b/bun.lockb index 68a3b11e7..c9cf84fce 100644 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 30dbbe6d9..de2ad62c2 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "dev:bot": "bun run build:bot --dev && bun start:bot", "start:bot": "bun dist/bot/main.js", "dev:docs": "vitepress dev docs", - "dev:website": "cd packages/website && bun run dev", + "dev:website": "cd packages/website-ue && bun run dev", "dev:api": "bun --filter=@blitzkit/api run dev", "setup:depotdownloader": "bun --filter=@blitzkit/scripts run setup:depotdownloader", "setup:patches": "bun --filter=@blitzkit/scripts run setup:patches", @@ -40,10 +40,15 @@ }, "license": "MIT", "dependencies": { + "@astrojs/react": "^4.3.0", + "@types/react": "^19.1.5", + "@types/react-dom": "^19.1.5", "googleapis": "^144.0.0", "lodash-es": "^4.17.21", "protobufjs": "^7.5.2", "quicklime": "^1.2.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", "sharp": "^0.33.5" }, "devDependencies": { diff --git a/packages/website-ue/.gitignore b/packages/website-ue/.gitignore new file mode 100644 index 000000000..16d54bb13 --- /dev/null +++ b/packages/website-ue/.gitignore @@ -0,0 +1,24 @@ +# build output +dist/ +# generated types +.astro/ + +# dependencies +node_modules/ + +# logs +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* + + +# environment variables +.env +.env.production + +# macOS-specific files +.DS_Store + +# jetbrains setting folder +.idea/ diff --git a/packages/website-ue/README.md b/packages/website-ue/README.md new file mode 100644 index 000000000..d8af7d24d --- /dev/null +++ b/packages/website-ue/README.md @@ -0,0 +1,47 @@ +# Astro Starter Kit: Minimal + +```sh +bun create astro@latest -- --template minimal +``` + +[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/minimal) +[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/minimal) +[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/minimal/devcontainer.json) + +> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun! + +## 🚀 Project Structure + +Inside of your Astro project, you'll see the following folders and files: + +```text +/ +├── public/ +├── src/ +│ └── pages/ +│ └── index.astro +└── package.json +``` + +Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name. + +There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components. + +Any static assets, like images, can be placed in the `public/` directory. + +## 🧞 Commands + +All commands are run from the root of the project, from a terminal: + +| Command | Action | +| :------------------------ | :----------------------------------------------- | +| `bun install` | Installs dependencies | +| `bun dev` | Starts local dev server at `localhost:4321` | +| `bun build` | Build your production site to `./dist/` | +| `bun preview` | Preview your build locally, before deploying | +| `bun astro ...` | Run CLI commands like `astro add`, `astro check` | +| `bun astro -- --help` | Get help using the Astro CLI | + +## 👀 Want to learn more? + +Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat). diff --git a/packages/website-ue/astro.config.mjs b/packages/website-ue/astro.config.mjs new file mode 100644 index 000000000..53e49de9a --- /dev/null +++ b/packages/website-ue/astro.config.mjs @@ -0,0 +1,9 @@ +// @ts-check +import { defineConfig } from 'astro/config'; + +import react from '@astrojs/react'; + +// https://astro.build/config +export default defineConfig({ + integrations: [react()] +}); \ No newline at end of file diff --git a/packages/website-ue/package.json b/packages/website-ue/package.json new file mode 100644 index 000000000..99e8d18cc --- /dev/null +++ b/packages/website-ue/package.json @@ -0,0 +1,20 @@ +{ + "name": "website-ue", + "type": "module", + "scripts": { + "dev": "astro dev", + "build": "astro build", + "preview": "astro preview", + "astro": "astro" + }, + "dependencies": { + "@blitzkit/core": "workspace:*", + "@blitzkit/i18n": "workspace:*", + "@astrojs/react": "^4.3.0", + "@types/react": "^19.1.5", + "@types/react-dom": "^19.1.5", + "astro": "^5.8.0", + "react": "^19.1.0", + "react-dom": "^19.1.0" + } +} diff --git a/packages/website-ue/src/pages/[...locale]/index.astro b/packages/website-ue/src/pages/[...locale]/index.astro new file mode 100644 index 000000000..2c38fd6f7 --- /dev/null +++ b/packages/website-ue/src/pages/[...locale]/index.astro @@ -0,0 +1,15 @@ +--- +import locales from '@blitzkit/i18n/locales.json'; +import type { GetStaticPaths } from 'astro'; + +export const getStaticPaths = (() => { + return locales.supported.map(({ locale, blitz }) => ({ + params: { locale: locale === locales.default ? undefined : locale }, + props: { locale, blitzLocale: blitz ?? locale }, + })); +}) satisfies GetStaticPaths; + +const { locale } = Astro.props; +--- + +Hello in {locale}! diff --git a/packages/website-ue/tsconfig.json b/packages/website-ue/tsconfig.json new file mode 100644 index 000000000..2158c2b40 --- /dev/null +++ b/packages/website-ue/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": ["../../tsconfig.json", "astro/tsconfigs/strict"], + "include": [".astro/types.d.ts", "**/*"], + "exclude": ["dist"], + "compilerOptions": { + "jsx": "react-jsx", + "jsxImportSource": "react" + } +}