From 3cd7c41dbd027a1ed0d7435ca1b4ac67da77f267 Mon Sep 17 00:00:00 2001 From: Mohammed Imaduddin <123477562+mdimado@users.noreply.github.com> Date: Fri, 24 Jan 2025 16:33:29 +0530 Subject: [PATCH] docs: Add instructions for building and developing locally --- README.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/README.md b/README.md index a6e070dd2..93a71e810 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,49 @@ # Website (v2) sern's clean, modern, and user-friendly web interface. (now built with [Starlight](https://starlight.astro.build/)) + + +To build and develop the **sern-handler-website** locally, follow these steps: + +### **Prerequisites** +1. **Install Bun**: Bun is used as the package manager and runtime for this project. Install it from the official website: [https://bun.sh/](https://bun.sh/). +2. **Node Version Manager (Optional)**: The `.nvmrc` file specifies the Node.js version. Use a version manager like `nvm` to ensure compatibility: + ```bash + nvm install + nvm use + ``` +3. **Git**: Make sure you have Git installed to clone the repository. + +--- + +### **Steps to Build and Develop** +1. **Clone the Repository**: + ```bash + git clone https://github.com/sern-handler/website.git + cd sern-handler-website + ``` + +2. **Install Dependencies**: + Bun uses the `bun.lockb` file to manage dependencies. Run: + ```bash + bun install + ``` + +3. **Development Server**: + To start a local development server: + ```bash + bun dev + ``` + +4. **Build the Project**: + To generate a production-ready build: + ```bash + bun build + ``` + +5. **Run Locally**: + After building, you can preview the built site locally: + ```bash + bun preview + ``` +