From 679fb5a11e5d0d59db721b555028878453132a28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 21 Mar 2023 22:56:27 +0100 Subject: [PATCH] subprojects/extensions-tool: Support stylesheet variants Now that extensions can provide dark/light variants of their stylesheet, pick up those files automatically when packaging an extension. Part-of: --- subprojects/extensions-tool/man/gnome-extensions.txt | 7 ++++--- subprojects/extensions-tool/src/command-pack.c | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/subprojects/extensions-tool/man/gnome-extensions.txt b/subprojects/extensions-tool/man/gnome-extensions.txt index 85d657bd9..25809a239 100644 --- a/subprojects/extensions-tool/man/gnome-extensions.txt +++ b/subprojects/extensions-tool/man/gnome-extensions.txt @@ -140,9 +140,10 @@ Creates a new extension from a template. Creates an extension bundle that is suitable for publishing. + The bundle will always include the required files extension.js -and metadata.json, as well as the optional stylesheet.css and -prefs.js if found. Each additional source that should be included -must be specified with *--extra-source*. +and metadata.json, as well as any of the optional stylesheet.css, +stylesheet-dark.css, stylesheet-light.css or prefs.js if found. +Each additional source that should be included must be specified +with *--extra-source*. + If the extension includes one or more GSettings schemas, they can either be placed in a schemas/ folder to be picked up automatically, diff --git a/subprojects/extensions-tool/src/command-pack.c b/subprojects/extensions-tool/src/command-pack.c index f2cfcd51a..4c07bf3ad 100644 --- a/subprojects/extensions-tool/src/command-pack.c +++ b/subprojects/extensions-tool/src/command-pack.c @@ -387,6 +387,8 @@ pack_extension (char *srcdir, pack = extension_pack_new (srcdir); extension_pack_add_source (pack, "extension.js"); extension_pack_add_source (pack, "metadata.json"); + extension_pack_add_source (pack, "stylesheet-dark.css"); + extension_pack_add_source (pack, "stylesheet-light.css"); extension_pack_add_source (pack, "stylesheet.css"); extension_pack_add_source (pack, "prefs.js");