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
├── modules/ # Feature modules, including the optional bQuery example
79
80
└── index.ts # Main application entry point
80
81
81
82
tools/
@@ -104,6 +105,21 @@ The main configuration is in `header.config.json`. This file controls UserScript
104
105
}
105
106
```
106
107
108
+
### Optional bQuery Integration
109
+
110
+
The template now ships with a selective `@bquery/bquery` example instead of replacing the existing utility layer.
111
+
112
+
- The existing `DOMUtils`, `EventEmitter`, `Storage`, and mobile helpers remain the default foundation.
113
+
- The advanced example in `src/modules/bquery-example.ts` demonstrates when bQuery adds value:
114
+
-`@bquery/bquery/core` for DOM updates and delegated events
115
+
-`@bquery/bquery/reactive` for signal-driven state
116
+
-`@bquery/bquery/media` for responsive viewport state
117
+
- Only subpath imports are used so the bundle stays as small as possible.
118
+
- Because bQuery ships modern ESM, the advanced path now targets current UserScript-capable browsers and runtime versions (`node >=24`, `bun >=1.3.11`).
119
+
- If you do not want the advanced path, remove the `bquery-example` module import from `src/index.ts` and uninstall `@bquery/bquery`.
120
+
121
+
This keeps the base template approachable while still providing a modern upgrade path for more interactive UserScripts.
122
+
107
123
### Build Commands
108
124
109
125
```bash
@@ -242,6 +258,22 @@ export class MyModule extends EventEmitter<ModuleEvents> {
242
258
}
243
259
```
244
260
261
+
### bQuery Advanced Example
262
+
263
+
The included advanced example module shows a selective integration strategy:
264
+
265
+
- keep GM storage in `Storage`
266
+
- keep the existing template modules intact
267
+
- add bQuery only where it improves ergonomics
268
+
269
+
It uses:
270
+
271
+
- reactive signals for counter and panel state
272
+
- delegated event handling via bQuery core
273
+
- viewport/media tracking via bQuery media helpers
274
+
275
+
That makes it a good starting point for overlays, dashboards, and richer in-page tools without forcing a full framework-style migration.
276
+
245
277
### Mobile Utilities
246
278
247
279
Mobile-specific functionality for touch-enabled devices:
0 commit comments