Update README.md to enhance installation and testing instructions

This commit is contained in:
Lyz Coote
2026-02-03 07:47:41 +01:00
parent 0f71cd3e0a
commit 0d6157b2ff

View File

@@ -1,16 +1,82 @@
# README # EMLy
## About EMLy is a lightweight, cross-platform EML (Email Message) viewer built with [Wails](https://wails.io/), Go, and Svelte. It allows users to open and view `.eml` files, including support for viewing attachments like images and PDFs.
This is the official Wails Svelte template. ## Requirements
Before developing or building EMLy, ensure you have the following installed:
* **Go**: Version 1.24 or later (Project uses 1.24.4) - [Download](https://go.dev/dl/)
* **Wails CLI**: Version v2 - [Installation Guide](https://wails.io/docs/gettingstarted/installation)
* **Node.js**: Required for the frontend build tools.
* **Bun**: The project uses `bun` as the frontend package manager. - [Install Bun](https://bun.sh/)
* Install via: `powershell -c "irm bun.sh/install.ps1 | iex"` (Windows) or `curl -fsSL https://bun.sh/install | bash` (macOS/Linux).
## Installation
1. Clone the repository:
```bash
git clone https://github.com/yourusername/EMLy.git
cd EMLy
```
2. Install frontend dependencies:
```bash
cd frontend
bun install
cd ..
```
*Note: The Wails build process is configured to handle `bun install` automatically if you run `wails build`, but running it manually ensures your IDE is happy.*
## Live Development ## Live Development
To run in live development mode, run `wails dev` in the project directory. This will run a Vite development To run the application in development mode with hot-reload:
server that will provide very fast hot reload of your frontend changes. If you want to develop in a browser
and have access to your Go methods, there is also a dev server that runs on http://localhost:34115. Connect ```bash
to this in your browser, and you can call your Go code from devtools. wails dev
```
* This starts the Go backend and a Vite development server for the frontend.
* The application window will open automatically.
* You can also access the frontend in a browser at `http://localhost:34115` to debug with standard browser devtools (though backend calls will still route to the running Go process).
## Building ## Building
To build a redistributable, production mode package, use `wails build`. To build a redistributable, production-ready binary:
```bash
wails build
```
The output binary will be located in the `build/bin` directory.
### Cross-Compilation & Installers
The project contains configuration for building installers:
* **Windows**: NSIS script located in `build/windows/installer/project.nsi`.
* **MacOS**: Bundle configuration in `build/darwin/`.
To build with specific platform targets (if your environment supports it):
```bash
wails build -platform windows/amd64
```
## Testing
### Frontend Tests
Run the Svelte check to ensure type safety and valid Svelte code:
```bash
cd frontend
bun run check
```
### Backend Tests
To run Go unit tests (if any are added to `backend/`) or standard Go tests:
```bash
go test ./...
```