From 4c8a4b3fdb76de4b129209f955bdda4f46d9cff4 Mon Sep 17 00:00:00 2001 From: PKulkoRaccoonGang Date: Wed, 4 Mar 2026 11:28:24 -0800 Subject: [PATCH] docs: improve help text for --defaultThemeVariants CLI flag --- bin/paragon-scripts.js | 6 +++++- lib/__tests__/help.test.js | 10 +++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/bin/paragon-scripts.js b/bin/paragon-scripts.js index ff863f4429..bdd90fa8e0 100755 --- a/bin/paragon-scripts.js +++ b/bin/paragon-scripts.js @@ -192,7 +192,11 @@ const COMMANDS = { }, { name: '--defaultThemeVariants', - description: `Specifies default theme variants. Defaults to a single 'light' theme variant. + description: `Specifies which theme variants are marked as defaults in the generated theme-urls.json. + Consuming applications (Open edX micro-frontends) use theme-urls.json to determine + which theme CSS files to load; variants listed here are loaded automatically without + requiring explicit configuration. Variants not listed as defaults are still built and + available but must be explicitly selected by the consuming application. You can provide multiple default theme variants by passing multiple values, for example: \`--defaultThemeVariants light dark\` `, diff --git a/lib/__tests__/help.test.js b/lib/__tests__/help.test.js index 753f865f90..9a16dfa2ff 100644 --- a/lib/__tests__/help.test.js +++ b/lib/__tests__/help.test.js @@ -135,7 +135,15 @@ describe('helpCommand', () => { expect(console.log).toHaveBeenCalledWith( expect.stringContaining(`${chalk.yellow.bold('--defaultThemeVariants')} ${chalk.grey('Default: light')}`), ); - expect(console.log).toHaveBeenCalledWith(expect.stringContaining('Specifies default theme variants')); + expect(console.log).toHaveBeenCalledWith( + expect.stringContaining('Specifies which theme variants are marked as defaults in the generated theme-urls.json.'), + ); + expect(console.log).toHaveBeenCalledWith( + expect.stringContaining('Consuming applications (Open edX micro-frontends) use theme-urls.json'), + ); + expect(console.log).toHaveBeenCalledWith( + expect.stringContaining('Variants not listed as defaults are still built and'), + ); expect(console.log).toHaveBeenCalledWith(expect.stringContaining('You can provide multiple default theme variants')); expect(console.log).toHaveBeenCalledWith(expect.stringContaining('example: `--defaultThemeVariants light dark`')); /* eslint-enable no-console */