@openedx/paragon 23.4.0 → 23.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/paragon-scripts.js +2 -1
- package/lib/build-tokens.js +4 -2
- package/package.json +1 -1
package/bin/paragon-scripts.js
CHANGED
|
@@ -92,7 +92,8 @@ const COMMANDS = {
|
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
94
|
name: '-t, --themes',
|
|
95
|
-
description:
|
|
95
|
+
description: `Specify themes to include in the token build.
|
|
96
|
+
Can be provided as a comma-separated list (e.g., "light,dark") or multiple arguments (e.g., "-t light -t dark").`,
|
|
96
97
|
defaultValue: 'light',
|
|
97
98
|
},
|
|
98
99
|
{
|
package/lib/build-tokens.js
CHANGED
|
@@ -47,7 +47,9 @@ async function buildTokensCommand(commandArgs) {
|
|
|
47
47
|
},
|
|
48
48
|
);
|
|
49
49
|
|
|
50
|
-
const
|
|
50
|
+
const parsedThemes = Array.isArray(themes) ? themes : themes.split(',').map(t => t.trim());
|
|
51
|
+
|
|
52
|
+
const StyleDictionary = await initializeStyleDictionary({ themes: parsedThemes });
|
|
51
53
|
|
|
52
54
|
const coreConfig = {
|
|
53
55
|
include: [
|
|
@@ -144,7 +146,7 @@ async function buildTokensCommand(commandArgs) {
|
|
|
144
146
|
// Create list of style-dictionary configurations to build (core + theme variants)
|
|
145
147
|
const configs = [
|
|
146
148
|
{ config: coreConfig },
|
|
147
|
-
...
|
|
149
|
+
...parsedThemes.map((themeVariant) => {
|
|
148
150
|
const config = getStyleDictionaryConfig(themeVariant);
|
|
149
151
|
return {
|
|
150
152
|
config,
|