@enhance-eng/sandbox 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -9,13 +9,24 @@ npm install @enhance-eng/sandbox
9
9
  # or pnpm add @enhance-eng/sandbox
10
10
  ```
11
11
 
12
- After installing, copy the runtime assets into your web root:
12
+ To keep the bundled assets current automatically, add an `enhance.config.json` at your project root and reinstall:
13
+
14
+ ```json
15
+ {
16
+ "publicDir": "./public",
17
+ "swFilename": "sw-enhance.js"
18
+ }
19
+ ```
20
+
21
+ The postinstall hook reads this file and copies the service worker (`sw-enhance.js`) plus overlay bundle (`assets/overlay.js`) into the configured directory. Rerunning `npm install` or bumping `@enhance-eng/sandbox` keeps both files up to date without any extra steps.
22
+
23
+ Prefer to run the sync manually? You can still call the CLI directly:
13
24
 
14
25
  ```bash
15
26
  npx enhance-sandbox prepare-sw --public-dir ./public --filename sw-enhance.js
16
27
  ```
17
28
 
18
- The command writes a service worker (`sw-enhance.<hash>.js`) and overlay bundles (`overlay-bootstrap.<hash>.js`, `overlay.<hash>.js`) into `./public/assets`.
29
+ Both paths write the service worker and overlay bundle into your public directory.
19
30
 
20
31
  ## Initialise
21
32
 
@@ -39,7 +50,7 @@ When the page loads with `?enhance=1`, the runtime registers the service worker,
39
50
  The package exposes an `enhance-sandbox` binary:
40
51
 
41
52
  - `prepare-sw` – copy bundled assets into a public directory.
42
- - `asset-manifest` – print the hashed filenames for templating or deploy verification.
53
+ - `manifest` – print the packaged asset metadata for templating or deploy verification.
43
54
 
44
55
  Run `npx enhance-sandbox --help` to view all commands and options.
45
56