mirror of
https://github.com/penpot/penpot.git
synced 2026-09-30 07:46:16 +00:00
🐛 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:
parent
dad6026132
commit
d19ab6e060
@ -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();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -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();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user