@design-token-kit/cli 0.3.0 → 0.3.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/index.mjs +3 -4
- package/package.json +2 -2
package/bin/index.mjs
CHANGED
|
@@ -121,14 +121,13 @@ import { writeFile as writeFile2 } from "fs/promises";
|
|
|
121
121
|
import { spawn } from "child_process";
|
|
122
122
|
import path from "path";
|
|
123
123
|
import { tmpdir } from "os";
|
|
124
|
-
import {
|
|
124
|
+
import { createTokenHtmlShowcase } from "@design-token-kit/core";
|
|
125
125
|
var EXIT_FAILURE3 = 1;
|
|
126
126
|
var showcaseCommand = new Command3("showcase").description("Create HTML showcase from DTCG JSON, HRDT YAML, or CSS.").argument("[files...]", "Paths to token JSON, HRDT, or CSS files (reads from stdin when omitted)").option("-o, --out <file>", "Output HTML file name or path").option("--open", "Open the generated HTML in browser (only with --out)").addHelpText("after", "\nExit status:\n 0 success\n 1 showcase failed").action(async (files, options) => {
|
|
127
127
|
try {
|
|
128
128
|
const showcase = createTokenHtmlShowcase();
|
|
129
|
-
const sources =
|
|
130
|
-
const
|
|
131
|
-
const html = await showcase.showcase(filePaths);
|
|
129
|
+
const sources = files.length > 0 ? files : ["-"];
|
|
130
|
+
const html = await showcase.showcase(sources);
|
|
132
131
|
if (options.out) {
|
|
133
132
|
const targetFile = resolveOutputPath(options.out);
|
|
134
133
|
await writeFile2(targetFile, html);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@design-token-kit/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "CLI for Design Token Kit: validate, convert, showcase.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"design-tokens",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"test": "vitest run"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@design-token-kit/core": "0.3.
|
|
45
|
+
"@design-token-kit/core": "0.3.1",
|
|
46
46
|
"commander": "14.0.1"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|