Skip to content

Commit d286ebc

Browse files
committed
chore: update README
1 parent aece525 commit d286ebc

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,6 @@
99

1010
---
1111

12-
## Quick Start
13-
14-
```bash
15-
pnpm install
16-
pnpm build
17-
```
18-
1912
### Usage
2013

2114
```ts
@@ -100,6 +93,16 @@ Uses native property setters to bypass React/Vue/Angular framework interceptors.
10093
- [Android](docs/android-dev.md) — Kotlin `Snapfill` helper and `SnapfillWebView`
10194
- [iOS](docs/ios-dev.md) — Swift `Snapfill` helper and `SnapfillWebView`
10295

96+
## Documentation
97+
98+
The full documentation site (with a live demo) is available at **[wangdicoder.github.io/snapfill](https://wangdicoder.github.io/snapfill/)**.
99+
100+
To run it locally:
101+
102+
```bash
103+
pnpm --filter @snapfill/website dev
104+
```
105+
103106
## Development
104107

105108
```bash
@@ -125,7 +128,8 @@ packages/
125128
│ │ └── valueCapture # Form value monitoring
126129
│ ├── fillers/
127130
│ │ └── formFiller # Field filling with native setters
128-
│ ├── injectable # WebView-injectable script strings
131+
│ ├── scripts/ # Entry points for injectable IIFE bundles
132+
│ ├── injectable # Re-exports generated script strings
129133
│ ├── constants # Regex patterns, autocomplete maps
130134
│ └── types # TypeScript type definitions
131135
@@ -147,4 +151,4 @@ packages/
147151
└── SnapfillModels # Data structs
148152
```
149153

150-
Core exports both **functions** for direct web use (tree-shakeable) and **script strings** (via `injectable.ts`) for WebView injection. Native libraries inject the same scripts via platform-specific WebView APIs (`evaluateJavascript` on Android, `WKUserScript` on iOS). A bridge shim provides `window.ReactNativeWebView.postMessage()` so the same scripts work across all platforms.
154+
Core exports both **functions** for direct web use (tree-shakeable) and **script strings** for WebView injection. The injectable scripts are generated at build time from the same typed source modules (via `scripts/` entry points bundled with esbuild), ensuring a single source of truth. Native libraries inject these scripts via platform-specific WebView APIs (`evaluateJavascript` on Android, `WKUserScript` on iOS). A bridge shim provides `window.ReactNativeWebView.postMessage()` so the same scripts work across all platforms.

0 commit comments

Comments
 (0)