Skip to content

Commit d68da75

Browse files
author
KennyG
committed
Enhance README for Group Details plugin with detailed instructions on regenerating images.js. Added clarification on the build script functionality and emphasized the importance of committing both PNG assets and the generated images.js file after changes.
1 parent 2102c43 commit d68da75

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

plugins/GroupDetails/README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,32 @@ The plugin picks a PNG badge using a 2% tolerance (`>= 98%` of target resolution
7171

7272
## Assets And Build
7373

74-
Badges are authored as PNG files in `assets/` and embedded into `images.js` as base64 data URIs.
74+
Badges are authored as PNG files in `assets/` and embedded into `images.js` as base64 data URIs. The image.js provides base64 data back to the plugin and users can ultimately swap a logo on their plugin for further customiation if desired.
75+
`images.js` is generated output and should not be hand-edited.
7576

7677
- Source files: `plugins/GroupDetails/assets/*.png`
7778
- Generated file: `plugins/GroupDetails/images.js`
79+
- Build script: `plugins/GroupDetails/build.sh`
7880

79-
Regenerate `images.js` after changing PNGs:
81+
### Regenerating `images.js`
82+
83+
From `plugins/GroupDetails/`:
8084

8185
```bash
8286
bash build.sh
8387
```
8488

85-
`build.sh` reads `assets/*.png`, sorts filenames deterministically, and rewrites `images.js`.
89+
What `build.sh` does:
90+
91+
- validates that `assets/` exists and contains at least one `*.png`
92+
- reads `assets/*.png`
93+
- sorts filenames deterministically (stable diffs)
94+
- rewrites `images.js` with `window.GroupDetailsImages = { ... }`
95+
96+
Commit both:
97+
98+
- the changed PNG files in `assets/`
99+
- the regenerated `images.js`
86100

87101
## Updates Not Showing?
88102

0 commit comments

Comments
 (0)