Migrate workspace to Vite+

This commit is contained in:
Yangshun
2026-03-20 15:59:43 +08:00
parent fa1ec6c7ec
commit 155e636829
15 changed files with 1175 additions and 316 deletions

View File

@@ -6,7 +6,7 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "oxlint next.config.mjs src",
"lint": "vp lint next.config.mjs src",
"tsc": "tsc",
"postinstall": "prisma generate",
"seed": "ts-node prisma/seed.ts",

View File

@@ -1,13 +1,13 @@
# Website
This website is built using Docusaurus 2, a modern static website generator. It is part of a [Turborepo](https://turborepo.org/) monorepo setup.
This website is built using Docusaurus 2, a modern static website generator. It is part of the repository's Vite+ monorepo setup.
### Installation
We use pnpm as the package manager. At the root of the repository, run `pnpm install` to install the monorepo dependencies.
Vite+ manages installs through the repository's declared package manager. At the root of the repository, run `vp install` to install the monorepo dependencies.
```sh
$ pnpm install
$ vp install
```
### Local Development
@@ -15,18 +15,17 @@ $ pnpm install
Also at the root of the repository, run:
```sh
$ pnpm dev:website
$ vp run dev
```
This command starts a local development server and opens up a browser window. Most changes made to JavaScript and Markdown files will be reflected instantly without having to restart the server.
### Build
Navigate to the `apps/website` directory.
From the repository root, run:
```sh
cd apps/website
$ pnpm build
$ vp run --filter @tih/website build
```
This command generates static content into the `build` directory and can be served using any static contents hosting service.
@@ -34,7 +33,8 @@ This command generates static content into the `build` directory and can be serv
### Deployment
```
$ GIT_USER=<Your GitHub username> USE_SSH=1 pnpm deploy
$ cd apps/website
$ GIT_USER=<Your GitHub username> USE_SSH=1 vp run deploy
```
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

View File

@@ -7,7 +7,7 @@
"start": "docusaurus start",
"dev": "docusaurus start",
"build": "docusaurus build",
"lint": "oxlint docusaurus.config.js sidebars.js src",
"lint": "vp lint docusaurus.config.js sidebars.js src",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy"
},

View File

@@ -324,7 +324,10 @@ function HowToUseSection() {
<HowToUseStep
index={4}
title={<>Prepare for the job</>}
contents={['How to choose between companies', 'Guide to engineering levels']}
contents={[
'How to choose between companies',
'Guide to engineering levels',
]}
ctaLink="/choosing-between-companies"
/>
</div>