🐛 Reorder watch handler steps to prevent sprite deletion (#11198)

copyAssets uses rsync --delete which removes the sprites/ directory
from resources/public/images/ because it only exists in public, not in
the source resources/images/ tree. compileSvgSprites must run AFTER
copyAssets so the generated sprites are not deleted before
compileTemplates reads them.

The initial build sequence (lines 65-70) already had the correct order;
the watch handlers in watch.js and watch-storybook.js were reversed.
This commit is contained in:
0xTHAC0 2026-09-24 19:38:42 +05:30 committed by GitHub
parent dad6026132
commit d19ab6e060
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -81,8 +81,8 @@ h.watch("translations", null, async function (path) {
log.info("watch: assets (~)"); log.info("watch: assets (~)");
h.watch(["resources/images", "resources/fonts"], null, async function (path) { h.watch(["resources/images", "resources/fonts"], null, async function (path) {
log.info("changed:", path); log.info("changed:", path);
await h.compileSvgSprites();
await h.copyAssets(); await h.copyAssets();
await h.compileSvgSprites();
await h.compileTemplates(); await h.compileTemplates();
}); });

View File

@ -101,8 +101,8 @@ h.watch("translations", null, async function (path) {
log.info("watch: assets (~)"); log.info("watch: assets (~)");
h.watch(["resources/images", "resources/fonts"], null, async function (path) { h.watch(["resources/images", "resources/fonts"], null, async function (path) {
log.info("changed:", path); log.info("changed:", path);
await h.compileSvgSprites();
await h.copyAssets(); await h.copyAssets();
await h.compileSvgSprites();
await h.compileTemplates(); await h.compileTemplates();
}); });