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: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2324>
This commit is contained in:
Florian Müllner 2023-03-21 22:56:27 +01:00
parent bce0788809
commit 679fb5a11e
2 changed files with 6 additions and 3 deletions

View File

@ -140,9 +140,10 @@ Creates a new extension from a template.
Creates an extension bundle that is suitable for publishing. Creates an extension bundle that is suitable for publishing.
+ +
The bundle will always include the required files extension.js The bundle will always include the required files extension.js
and metadata.json, as well as the optional stylesheet.css and and metadata.json, as well as any of the optional stylesheet.css,
prefs.js if found. Each additional source that should be included stylesheet-dark.css, stylesheet-light.css or prefs.js if found.
must be specified with *--extra-source*. Each additional source that should be included must be specified
with *--extra-source*.
+ +
If the extension includes one or more GSettings schemas, they can If the extension includes one or more GSettings schemas, they can
either be placed in a schemas/ folder to be picked up automatically, either be placed in a schemas/ folder to be picked up automatically,

View File

@ -387,6 +387,8 @@ pack_extension (char *srcdir,
pack = extension_pack_new (srcdir); pack = extension_pack_new (srcdir);
extension_pack_add_source (pack, "extension.js"); extension_pack_add_source (pack, "extension.js");
extension_pack_add_source (pack, "metadata.json"); 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, "stylesheet.css");
extension_pack_add_source (pack, "prefs.js"); extension_pack_add_source (pack, "prefs.js");