Refactoring with documentation

This commit is contained in:
Tw93
2025-08-28 19:35:31 +08:00
parent 6630d1f170
commit f5085c0176
14 changed files with 503 additions and 41 deletions

View File

@@ -45,16 +45,16 @@ grep -r "window_config" src-tauri/src/
```bash
# Install dependencies
npm i
pnpm i
# Development with hot reload (for testing app functionality)
npm run dev
pnpm run dev
# CLI development
npm run cli:dev
pnpm run cli:dev
# Production build
npm run build
pnpm run build
```
### 3. Testing and Validation
@@ -63,16 +63,16 @@ npm run build
```bash
# Run comprehensive test suite (unit + integration + builder)
npm test
pnpm test
# Build CLI for testing
npm run cli:build
pnpm run cli:build
# Debug build for development
npm run build:debug
pnpm run build:debug
# Multi-platform testing
npm run build:mac # macOS universal build
pnpm run build:mac # macOS universal build
```
**Testing Checklist:**
@@ -89,7 +89,7 @@ npm run build:mac # macOS universal build
- Do NOT use `PAKE_NO_CONFIG_OVERWRITE=1` - this environment variable is not implemented
- For CLI testing: `node dist/cli.js https://example.com --name TestApp --debug`
- **For app functionality testing**: Use `npm run dev` to start development server with hot reload. This allows real-time testing of injected JavaScript changes without rebuilding the entire app.
- **For app functionality testing**: Use `pnpm run dev` to start development server with hot reload. This allows real-time testing of injected JavaScript changes without rebuilding the entire app.
- The dev server automatically reloads when you modify files in `src-tauri/src/inject/` directory
## Core Components
@@ -110,7 +110,7 @@ npm run build:mac # macOS universal build
## Documentation Guidelines
- **Main README**: Only include common, frequently-used parameters to avoid clutter
- **CLI Documentation** (`bin/README.md`): Include ALL parameters with detailed usage examples
- **CLI Documentation** (`docs/cli-usage.md`): Include ALL parameters with detailed usage examples
- **Rare/Advanced Parameters**: Should have full documentation in CLI docs but minimal/no mention in main README
- **Examples of rare parameters**: `--title`, `--incognito`, `--system-tray-icon`, etc.
@@ -133,7 +133,7 @@ npm run build:mac # macOS universal build
```bash
# 1. Check logs
npm run dev 2>&1 | grep -i error
pnpm run dev 2>&1 | grep -i error
# 2. Verify dependencies
cargo check --manifest-path=src-tauri/Cargo.toml