@digdir/designsystemet 1.14.0 → 1.15.0
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/dist/bin/designsystemet.js +3 -1
- package/dist/package.js +1 -1
- package/dist/src/types.js +6 -0
- package/package.json +7 -7
|
@@ -52,7 +52,9 @@ function makeTokenCommands() {
|
|
|
52
52
|
console.log(`\n✅ Finished building tokens in ${pc.green(outDir)}`);
|
|
53
53
|
return Promise.resolve();
|
|
54
54
|
});
|
|
55
|
-
tokenCmd.command("create").description("Create Designsystemet tokens").option(`-m, --${cliOptions.theme.colors.main} <name:hex...>`, `Main colors`, parseColorValues).option(`-s, --${cliOptions.theme.colors.support} <name:hex...>`, `Support colors`, parseColorValues).option(`-n, --${cliOptions.theme.colors.neutral} <hex>`, `Neutral hex color`, convertToHex).option(`-o, --${cliOptions.outDir} <string>`, `Output directory for created ${pc.blue("design-tokens")}`, DEFAULT_TOKENS_CREATE_DIR).option(
|
|
55
|
+
tokenCmd.command("create").description("Create Designsystemet tokens").option("--config <string>", `Path to config file (default: "${DEFAULT_CONFIG_FILEPATH}")`).option(`--${cliOptions.clean} [boolean]`, "Clean output directory before creating tokens", parseBoolean, false).option("--dry [boolean]", `Dry run for created ${pc.blue("design-tokens")}`, parseBoolean, false).option(`-m, --${cliOptions.theme.colors.main} <name:hex...>`, `Main colors (deprecated, use JSON config file instead)`, parseColorValues).option(`-s, --${cliOptions.theme.colors.support} <name:hex...>`, `Support colors (deprecated, use JSON config file instead)`, parseColorValues).option(`-n, --${cliOptions.theme.colors.neutral} <hex>`, `Neutral hex color (deprecated, use JSON config file instead)`, convertToHex).option(`-o, --${cliOptions.outDir} <string>`, `Output directory for created ${pc.blue("design-tokens")}`, DEFAULT_TOKENS_CREATE_DIR).option(`-f, --${cliOptions.theme.typography.fontFamily} <string>`, `Font family (experimental, deprecated, use JSON config file instead)`, DEFAULT_FONT).option(`-b, --${cliOptions.theme.borderRadius} <number>`, `Unitless base border-radius in px (deprecated, use JSON config file instead)`, (radiusAsString) => Number(radiusAsString), 4).option("--theme <string>", "Theme name (deprecated, use JSON config file instead)", DEFAULT_THEME_NAME).action(async (opts, cmd) => {
|
|
56
|
+
if (opts.mainColors || opts.supportColors || opts.neutralColor || opts.borderRadius && opts.borderRadius !== 4 || opts.theme && opts.theme !== DEFAULT_THEME_NAME || opts.fontFamily && opts.fontFamily !== DEFAULT_FONT) console.warn(pc.yellow(`\n ⚠️ Using CLI options for ${pc.bold(`colors, border radius, theme, or font family is deprecated`)} and will be removed in a future release.
|
|
57
|
+
\n ⚠️ Please use a JSON config file instead.`));
|
|
56
58
|
console.log(figletAscii);
|
|
57
59
|
if (opts.dry) console.log(`Performing dry run, no files will be written`);
|
|
58
60
|
const themeName = opts.theme;
|
package/dist/package.js
CHANGED
package/dist/src/types.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digdir/designsystemet",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0",
|
|
4
4
|
"description": "CLI for Designsystemet",
|
|
5
5
|
"author": "Designsystemet team",
|
|
6
6
|
"engines": {
|
|
@@ -45,21 +45,21 @@
|
|
|
45
45
|
"hsluv": "^1.0.1",
|
|
46
46
|
"object-hash": "^3.0.0",
|
|
47
47
|
"picocolors": "^1.1.1",
|
|
48
|
-
"postcss": "^8.5.
|
|
48
|
+
"postcss": "^8.5.14",
|
|
49
49
|
"ramda": "^0.32.0",
|
|
50
50
|
"style-dictionary": "^5.4.0",
|
|
51
|
-
"zod": "^4.4.
|
|
51
|
+
"zod": "^4.4.3",
|
|
52
52
|
"zod-validation-error": "^5.0.0",
|
|
53
|
-
"@digdir/designsystemet-types": "1.
|
|
53
|
+
"@digdir/designsystemet-types": "1.15.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@tokens-studio/types": "0.5.2",
|
|
57
57
|
"@types/chroma-js": "3.1.2",
|
|
58
|
-
"@types/node": "24.12.
|
|
58
|
+
"@types/node": "24.12.4",
|
|
59
59
|
"@types/object-hash": "3.0.6",
|
|
60
60
|
"@types/ramda": "0.31.1",
|
|
61
|
-
"tsdown": "0.
|
|
62
|
-
"tsx": "4.
|
|
61
|
+
"tsdown": "0.22.0",
|
|
62
|
+
"tsx": "4.22.1",
|
|
63
63
|
"typescript": "5.9.3"
|
|
64
64
|
},
|
|
65
65
|
"scripts": {
|