auto generated avatar grid
This fixes issue #2651 a quick summary for file changes and additions avatars.less
Replaced hardcoded avatar types with a single CSS class using variables. avatars.json
Updated .typeXX classes to .vignette with a data-type attribute.
avatarLoader.js Create this new file to dynamically assign avatar images.
Import avatarLoader.js.
To Automate the creation of avatars.json during build time.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated (UTC) |
|---|---|---|---|
| ancientbeast | ✅ Ready (Inspect) | Visit Preview | Dec 19, 2024 2:53am |
Heya! Thanks for the PR. Seems it fails to build. Also, please always ping issues using hashtag and then number: #2651
@MathioLucas I've opened a review. "package.json" is the faulty file, very obvious problem there 🐻
@MathioLucas PR titles should be more descriptive, something like "auto-generated unit avatar grid at build time" in this case, as even if properly tagging the issue there, it won't be clickable (like it can be in description). Plus it's way more useful when stuff is reviewed and very importantly, when generating the list of changes for a new version release.
@MathioLucas Hey! Still waiting for a fix on this one 🐻
Apologies for the long wait!
@MathioLucas All the avatars in the dash view show black and there are also errors during build process:
[04:43:05.085] Running build in Washington, D.C., USA (East) – iad1 [04:43:05.240] Cloning github.com/FreezingMoon/AncientBeast (Branch: master, Commit: 6aaf36f) [04:43:08.199] Cloning completed: 2.958s [04:43:08.725] Restored build cache from previous deployment (J6K3hYskmeuEeCk7RNfjU6XYxBAd) [04:43:08.824] Running "vercel build" [04:43:09.333] Vercel CLI 39.2.0 [04:43:10.441] Warning: Due to "engines": { "node": "20.x" } in your
package.jsonfile, the Node.js Version defined in your Project Settings ("18.x") will not apply, Node.js Version "20.x" will be used instead. Learn More: http://vercel.link/node-version [04:43:10.449] Running "install" command:npm install... [04:43:13.411] [04:43:13.411] changed 2 packages, and audited 1071 packages in 3s [04:43:13.412] [04:43:13.412] 131 packages are looking for funding [04:43:13.412] runnpm fundfor details [04:43:13.421] [04:43:13.421] 4 vulnerabilities (3 moderate, 1 high) [04:43:13.421] [04:43:13.421] To address all issues, run: [04:43:13.421] npm audit fix [04:43:13.421] [04:43:13.421] Runnpm auditfor details. [04:43:13.695] [04:43:13.697] > [email protected] build:dev [04:43:13.698] > webpack --mode=development [04:43:13.698] [04:43:14.315] Failed to load ./.env. [04:43:39.278] assets by path assets/units/ 3.73 MiB 370 assets [04:43:39.279] assets by path assets/autoload/phaser/ 421 KiB 73 assets [04:43:39.279] assets by path assets/stats/ 172 KiB 38 assets [04:43:39.279] assets by path assets/icons/ 57.1 KiB 34 assets [04:43:39.280] assets by path assets/interface/ 685 KiB 24 assets [04:43:39.280] assets by path .js 34.8 MiB 23 assets [04:43:39.280] assets by path assets/music/ 62.4 MiB 17 assets [04:43:39.280] assets by path assets/drops/stock/.png 3.68 KiB 12 assets [04:43:39.281] assets by path assets/sounds/*.ogg 252 KiB 9 assets [04:43:39.281] assets by path assets/cards/ 110 KiB 9 assets [04:43:39.281] assets by path assets/locations/ 791 KiB 4 assets [04:43:39.281] assets by path assets/fonts/ 75.3 KiB 4 assets [04:43:39.281] + 4 assets [04:43:39.282] runtime modules 8.48 KiB 13 modules [04:43:39.282] javascript modules 8.93 MiB [04:43:39.282] modules by path ./node_modules/ 7.87 MiB 635 modules [04:43:39.282] modules by path ./src/ 1020 KiB 71 modules [04:43:39.282] ./assets/index.js 62.6 KiB [built] [code generated] [04:43:39.282] asset modules 24.4 KiB (javascript) 68.7 MiB (asset) 595 modules [04:43:39.283] json modules 37.7 KiB [04:43:39.284] ./package.json 2.47 KiB [built] [code generated] [04:43:39.284] ./node_modules/node-emoji/lib/emoji.json 35.2 KiB [built] [code generated] [04:43:39.284] [04:43:39.284] ERROR in /vercel/path0/src/avatarLoader.js [04:43:39.284] 6:12-21 [04:43:39.284] [tsl] ERROR in /vercel/path0/src/avatarLoader.js(6,13) [04:43:39.285] TS2451: Cannot redeclare block-scoped variable 'avatarUrl'. [04:43:39.285] ts-loader-default_e3b0c44298fc1c14 [04:43:39.285] [04:43:39.285] ERROR in /vercel/path0/src/avatarLoader.js [04:43:39.285] 8:12-21 [04:43:39.285] [tsl] ERROR in /vercel/path0/src/avatarLoader.js(8,13) [04:43:39.286] TS2451: Cannot redeclare block-scoped variable 'avatarUrl'. [04:43:39.286] ts-loader-default_e3b0c44298fc1c14 [04:43:39.286] [04:43:39.286] webpack 5.94.0 compiled with 2 errors in 24576 ms [04:43:39.380] Error: Command "npm run build:dev" exited with 1 [04:43:39.646]
@MathioLucas Hey! Happy new year! 🥳 Any progress with this? 🐻
@MathioLucas When mentioning issues, just write something like #2651 I take it that you've forgot about this one. Someone else poked at it, ending up with problematic PR as well...