Add "Task" build and development process with Taskfile integration
- Added Taskfile.yml to streamline build, development, and testing tasks. - Updated README to reflect new build instructions and development environment setup using `go-task`. - Included `.taskfile.env` and `.task` in .dockerignore and .gitignore for better environment management. - Modified asset loading in verifier.ts to include integrity and cross-origin attributes for security. - Updated SRI generation script to handle both directory and single file inputs for improved flexibility.
This commit is contained in:
25
README.md
25
README.md
@@ -62,18 +62,14 @@ A software distribution platform for assets built and hosted on Gitea. Built wit
|
||||
|
||||
### Installation
|
||||
|
||||
1. **Build the Frontend**:
|
||||
1. **Build Everything (WASM, Frontend, Backend)**:
|
||||
```bash
|
||||
cd frontend
|
||||
pnpm install
|
||||
pnpm build
|
||||
cd ..
|
||||
go-task all
|
||||
```
|
||||
|
||||
2. **Build and Run the Backend**:
|
||||
2. **Run the Application**:
|
||||
```bash
|
||||
go build -o software-station .
|
||||
./software-station -t YOUR_TOKEN -s https://your-gitea-instance.com -ua-blocklist ua-blocklist.txt
|
||||
go-task run
|
||||
```
|
||||
|
||||
### Docker (Recommended)
|
||||
@@ -107,23 +103,18 @@ The frontend uses Tailwind CSS. You can customize the look and feel in `frontend
|
||||
|
||||
## Development
|
||||
|
||||
Run the backend and frontend separately for a better development experience:
|
||||
Run the backend and frontend simultaneously with live reload (uses parallel tasks):
|
||||
|
||||
```bash
|
||||
# Backend (with live reload using Air or just go run)
|
||||
go run main.go
|
||||
|
||||
# Frontend (Vite dev server)
|
||||
cd frontend
|
||||
pnpm dev
|
||||
go-task dev
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
We maintain a high test coverage (>60%). Run the test suite:
|
||||
Run the full test suite (including WASM tests):
|
||||
|
||||
```bash
|
||||
go test -v -coverpkg=./... ./...
|
||||
go-task test
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
Reference in New Issue
Block a user