You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-1Lines changed: 31 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,18 @@ For development with auto-reload:
30
30
pnpm run dev
31
31
```
32
32
33
+
To run tests:
34
+
35
+
```bash
36
+
pnpm test
37
+
```
38
+
39
+
To run tests in watch mode:
40
+
41
+
```bash
42
+
pnpm test:watch
43
+
```
44
+
33
45
## Implementation Plan
34
46
35
47
See [plan.md](./plan.md) for the detailed implementation phases and progress.
@@ -38,6 +50,24 @@ See [plan.md](./plan.md) for the detailed implementation phases and progress.
38
50
39
51
This project creates a self-modifying single-file HTML app that bundles JavaScript package files into one HTML file. The implementation follows a phased approach outlined in `plan.md`.
40
52
53
+
### Key Components:
54
+
55
+
-**Environment Detector**: Identifies the running context (file://, localhost, or https://)
56
+
-**File System Manager**: Handles file access operations with proper permissions
57
+
-**Source Bundle Manager**: Manages the bundled source files inside the HTML
58
+
-**Editor**: Provides code editing capabilities for bundled files
59
+
41
60
## Environment Handling
42
61
43
-
The app handles different environments (file://, localhost, and https://) with appropriate feature support for each context.
62
+
The app handles different environments (file://, localhost, and https://) with appropriate feature support for each context.
63
+
64
+
## Testing
65
+
66
+
The project includes tests for each component:
67
+
68
+
- Unit tests for environment detection
69
+
- Unit tests for source bundle management
70
+
- Unit tests for file system operations
71
+
- Unit tests for editor functionality
72
+
73
+
Tests are written using Vitest which provides a Jest-compatible API with Vite integration.
0 commit comments