@cieloazul310/digital-go-pandacss-cli 0.1.0-beta.9 → 0.1.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.cjs +241 -0
- package/bin/index.js +253 -0
- package/package.json +9 -7
- package/public/catalogue.json +178 -0
- package/bin/add-snippets.cjs +0 -96
- package/bin/add-snippets.js +0 -101
- package/bin/update.cjs +0 -94
- package/bin/update.js +0 -99
package/bin/index.cjs
ADDED
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
// src/index.ts
|
|
5
|
+
var import_commander = require("commander");
|
|
6
|
+
var import_fs5 = require("fs");
|
|
7
|
+
var import_path5 = require("path");
|
|
8
|
+
|
|
9
|
+
// src/load-catalogue.ts
|
|
10
|
+
var import_fs = require("fs");
|
|
11
|
+
var import_path = require("path");
|
|
12
|
+
function loadCatalogue() {
|
|
13
|
+
const cataloguePath = (0, import_path.resolve)(__dirname, "..", "public", "catalogue.json");
|
|
14
|
+
let file;
|
|
15
|
+
try {
|
|
16
|
+
file = (0, import_fs.readFileSync)(cataloguePath, "utf8");
|
|
17
|
+
} catch (err) {
|
|
18
|
+
throw new Error(`Could not read ${cataloguePath}: ${getErrorMessage(err)}`);
|
|
19
|
+
}
|
|
20
|
+
let catalogue;
|
|
21
|
+
try {
|
|
22
|
+
catalogue = JSON.parse(file);
|
|
23
|
+
} catch (err) {
|
|
24
|
+
throw new Error(
|
|
25
|
+
`Failed to parse JSON at ${cataloguePath}: ${getErrorMessage(err)}`
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
return catalogue;
|
|
29
|
+
}
|
|
30
|
+
function getErrorMessage(err) {
|
|
31
|
+
if (err instanceof Error) return err.message;
|
|
32
|
+
if (typeof err === "string") return err;
|
|
33
|
+
try {
|
|
34
|
+
return JSON.stringify(err);
|
|
35
|
+
} catch {
|
|
36
|
+
return String(err);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// src/install-snippets.ts
|
|
41
|
+
var import_simple_git = require("simple-git");
|
|
42
|
+
var import_os = require("os");
|
|
43
|
+
var import_fs4 = require("fs");
|
|
44
|
+
var import_path4 = require("path");
|
|
45
|
+
|
|
46
|
+
// src/read-config.ts
|
|
47
|
+
var import_fs2 = require("fs");
|
|
48
|
+
var import_path2 = require("path");
|
|
49
|
+
function readConfig(cwd = process.cwd()) {
|
|
50
|
+
const defaultConfig = {
|
|
51
|
+
outDir: "src/components/ui",
|
|
52
|
+
override: true
|
|
53
|
+
};
|
|
54
|
+
const configPath = (0, import_path2.join)(cwd, "components.json");
|
|
55
|
+
if (!(0, import_fs2.existsSync)(configPath)) {
|
|
56
|
+
return defaultConfig;
|
|
57
|
+
}
|
|
58
|
+
const config = JSON.parse(
|
|
59
|
+
(0, import_fs2.readFileSync)(configPath, "utf-8")
|
|
60
|
+
);
|
|
61
|
+
return {
|
|
62
|
+
...defaultConfig,
|
|
63
|
+
...config
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// src/copy-components.ts
|
|
68
|
+
var import_fs3 = require("fs");
|
|
69
|
+
var import_path3 = require("path");
|
|
70
|
+
function copyComponents({
|
|
71
|
+
templateDir,
|
|
72
|
+
outputDir,
|
|
73
|
+
versionComment,
|
|
74
|
+
override = true,
|
|
75
|
+
ids
|
|
76
|
+
}) {
|
|
77
|
+
if (!ids) {
|
|
78
|
+
if ((0, import_fs3.existsSync)(outputDir) && !override) {
|
|
79
|
+
throw new Error(
|
|
80
|
+
`\u51FA\u529B\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u65E2\u306B\u5B58\u5728\u3057\u307E\u3059: ${outputDir}. --override\u3092\u4F7F\u7528\u3057\u3066\u4E0A\u66F8\u304D\u3057\u3066\u304F\u3060\u3055\u3044\u3002`
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
(0, import_fs3.cpSync)(templateDir, outputDir, { recursive: true });
|
|
84
|
+
const dirs = (0, import_fs3.readdirSync)(outputDir, { withFileTypes: true });
|
|
85
|
+
for (const dir of dirs) {
|
|
86
|
+
if (dir.isDirectory()) {
|
|
87
|
+
const destDir = (0, import_path3.join)(outputDir, dir.name);
|
|
88
|
+
const files = (0, import_fs3.readdirSync)(destDir, { withFileTypes: true });
|
|
89
|
+
for (const file of files) {
|
|
90
|
+
if (file.isFile() && file.name.endsWith(".tsx")) {
|
|
91
|
+
const destPath = (0, import_path3.join)(destDir, file.name);
|
|
92
|
+
const content = (0, import_fs3.readFileSync)(destPath, "utf8");
|
|
93
|
+
if (versionComment && content.startsWith(versionComment)) continue;
|
|
94
|
+
(0, import_fs3.writeFileSync)(destPath, (versionComment || "") + content, "utf8");
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
if ((0, import_fs3.existsSync)(outputDir) && !override) {
|
|
102
|
+
throw new Error(
|
|
103
|
+
`\u51FA\u529B\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u65E2\u306B\u5B58\u5728\u3057\u307E\u3059: ${outputDir}. --override\u3092\u4F7F\u7528\u3057\u3066\u4E0A\u66F8\u304D\u3057\u3066\u304F\u3060\u3055\u3044\u3002`
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
for (const id of ids) {
|
|
107
|
+
const src = (0, import_path3.join)(templateDir, id);
|
|
108
|
+
if (!(0, import_fs3.existsSync)(src)) {
|
|
109
|
+
throw new Error(
|
|
110
|
+
`\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${id} (expected at ${src})`
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
const dest = (0, import_path3.join)(outputDir, id);
|
|
114
|
+
if ((0, import_fs3.existsSync)(dest) && !override) {
|
|
115
|
+
throw new Error(
|
|
116
|
+
`\u51FA\u529B\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u65E2\u306B\u5B58\u5728\u3057\u307E\u3059: ${dest}. --override\u3092\u4F7F\u7528\u3057\u3066\u4E0A\u66F8\u304D\u3057\u3066\u304F\u3060\u3055\u3044\u3002`
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
(0, import_fs3.cpSync)(src, dest, { recursive: true });
|
|
120
|
+
const destFiles = (0, import_fs3.readdirSync)(dest, { withFileTypes: true });
|
|
121
|
+
for (const file of destFiles) {
|
|
122
|
+
if (file.isFile() && file.name.endsWith(".tsx")) {
|
|
123
|
+
const destPath = (0, import_path3.join)(dest, file.name);
|
|
124
|
+
const content = (0, import_fs3.readFileSync)(destPath, "utf8");
|
|
125
|
+
if (versionComment && content.startsWith(versionComment)) continue;
|
|
126
|
+
(0, import_fs3.writeFileSync)(destPath, (versionComment || "") + content, "utf8");
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// src/version-comment.ts
|
|
133
|
+
function createVersionComment({
|
|
134
|
+
tag,
|
|
135
|
+
commit
|
|
136
|
+
} = {}) {
|
|
137
|
+
if (!tag || !commit) {
|
|
138
|
+
return "// Generated from Custom Source Directory\n";
|
|
139
|
+
}
|
|
140
|
+
return `// Generated from digital-go-design-system-with-panda@${tag} (commit: ${commit})
|
|
141
|
+
`;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// src/install-snippets.ts
|
|
145
|
+
async function main(args) {
|
|
146
|
+
const cwd = process.cwd();
|
|
147
|
+
const { outDir, sourceDir, override } = readConfig(cwd);
|
|
148
|
+
const tmpPath = (0, import_path4.join)((0, import_os.tmpdir)(), `digital-go-pandacss-${Date.now()}`);
|
|
149
|
+
let templateDir = void 0;
|
|
150
|
+
let versionComment = void 0;
|
|
151
|
+
if (sourceDir) {
|
|
152
|
+
(0, import_fs4.cpSync)((0, import_path4.join)(cwd, sourceDir), tmpPath, { recursive: true });
|
|
153
|
+
templateDir = tmpPath;
|
|
154
|
+
versionComment = createVersionComment();
|
|
155
|
+
} else {
|
|
156
|
+
const git = (0, import_simple_git.simpleGit)();
|
|
157
|
+
const repoUrl = "https://github.com/cieloazul310/digital-go-design-system-with-panda";
|
|
158
|
+
const templateSubdir = "components/src";
|
|
159
|
+
await git.clone(repoUrl, tmpPath);
|
|
160
|
+
const repoGit = (0, import_simple_git.simpleGit)(tmpPath);
|
|
161
|
+
const tag = (await repoGit.raw(["describe", "--tags", "--abbrev=0"])).trim();
|
|
162
|
+
const commit = (await repoGit.revparse(["HEAD"])).trim();
|
|
163
|
+
templateDir = (0, import_path4.join)(tmpPath, templateSubdir);
|
|
164
|
+
versionComment = createVersionComment({ tag, commit });
|
|
165
|
+
}
|
|
166
|
+
if (!(0, import_fs4.existsSync)(templateDir)) {
|
|
167
|
+
throw new Error(`\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${templateDir}`);
|
|
168
|
+
}
|
|
169
|
+
const outputDir = (0, import_path4.join)(cwd, outDir);
|
|
170
|
+
const idsToCopy = args && args.length > 0 ? args : void 0;
|
|
171
|
+
copyComponents({
|
|
172
|
+
templateDir,
|
|
173
|
+
outputDir,
|
|
174
|
+
override,
|
|
175
|
+
versionComment,
|
|
176
|
+
ids: idsToCopy
|
|
177
|
+
});
|
|
178
|
+
console.log(`\u2705 UI\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092 ${outDir} \u306B\u751F\u6210\u3057\u307E\u3057\u305F`);
|
|
179
|
+
}
|
|
180
|
+
async function installSnippets(args) {
|
|
181
|
+
await main(args).then(() => process.exit(0)).catch((err) => {
|
|
182
|
+
console.error(err);
|
|
183
|
+
process.exit(1);
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// src/index.ts
|
|
188
|
+
var program = new import_commander.Command();
|
|
189
|
+
program.name("digital-go-pandacss").description("\u30C7\u30B8\u30BF\u30EB\u5E81\u30C7\u30B6\u30A4\u30F3\u30B7\u30B9\u30C6\u30E0 for Panda CSS");
|
|
190
|
+
program.command("install [ids...]").description("\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3059\u308B\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092\u6307\u5B9A\u3057\u307E\u3059").option("--all", "\u3059\u3079\u3066\u306E\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3057\u307E\u3059").action(async (ids = [], options) => {
|
|
191
|
+
if (options.all && ids.length > 0) {
|
|
192
|
+
console.error("\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8ID\u3068--all\u3092\u540C\u6642\u306B\u6307\u5B9A\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093");
|
|
193
|
+
process.exit(2);
|
|
194
|
+
}
|
|
195
|
+
if (!options.all && ids.length === 0) {
|
|
196
|
+
console.error("\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8ID\u3092\u6307\u5B9A\u3059\u308B\u304B\u3001--all\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044");
|
|
197
|
+
process.exit(2);
|
|
198
|
+
}
|
|
199
|
+
const catalogue = loadCatalogue() ?? { components: {} };
|
|
200
|
+
const availableIds = Object.values(catalogue.components || {}).map(
|
|
201
|
+
({ id }) => id
|
|
202
|
+
);
|
|
203
|
+
const targetIds = options.all ? availableIds : ids;
|
|
204
|
+
const unknown = targetIds.filter((id) => !availableIds.includes(id));
|
|
205
|
+
if (unknown.length) {
|
|
206
|
+
console.error("\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8ID\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093:", unknown.join(", "));
|
|
207
|
+
process.exit(2);
|
|
208
|
+
}
|
|
209
|
+
try {
|
|
210
|
+
const { outDir: cfgOutDir, override: cfgOverride } = readConfig(
|
|
211
|
+
process.cwd()
|
|
212
|
+
);
|
|
213
|
+
const outputPath = (0, import_path5.join)(process.cwd(), cfgOutDir);
|
|
214
|
+
if ((0, import_fs5.existsSync)(outputPath) && !cfgOverride) {
|
|
215
|
+
console.error(
|
|
216
|
+
`\u51FA\u529B\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u65E2\u306B\u5B58\u5728\u3057\u307E\u3059: ${outputPath}. --override\u3092\u4F7F\u7528\u3057\u3066\u4E0A\u66F8\u304D\u3057\u3066\u304F\u3060\u3055\u3044\u3002`
|
|
217
|
+
);
|
|
218
|
+
process.exit(1);
|
|
219
|
+
}
|
|
220
|
+
await installSnippets(targetIds);
|
|
221
|
+
} catch (err) {
|
|
222
|
+
console.error(err);
|
|
223
|
+
process.exit(1);
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
program.command("list").description("\u5229\u7528\u53EF\u80FD\u306A\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8ID\u306E\u4E00\u89A7\u3092\u8868\u793A\u3057\u307E\u3059").option("--json", "JSON\u5F62\u5F0F\u3067\u51FA\u529B\u3057\u307E\u3059").action((options) => {
|
|
227
|
+
const catalogue = loadCatalogue();
|
|
228
|
+
if (!catalogue || !catalogue.components) {
|
|
229
|
+
console.error("\u30AB\u30BF\u30ED\u30B0\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093");
|
|
230
|
+
process.exit(1);
|
|
231
|
+
}
|
|
232
|
+
const comps = Object.values(catalogue.components);
|
|
233
|
+
if (options.json) {
|
|
234
|
+
console.log(JSON.stringify(comps, null, 2));
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
for (const { id, name } of comps) {
|
|
238
|
+
console.log(`${id} \u2014 ${name}`);
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
program.parse(process.argv);
|
package/bin/index.js
ADDED
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// ../../node_modules/tsup/assets/esm_shims.js
|
|
4
|
+
import path from "path";
|
|
5
|
+
import { fileURLToPath } from "url";
|
|
6
|
+
var getFilename = () => fileURLToPath(import.meta.url);
|
|
7
|
+
var getDirname = () => path.dirname(getFilename());
|
|
8
|
+
var __dirname = /* @__PURE__ */ getDirname();
|
|
9
|
+
|
|
10
|
+
// src/index.ts
|
|
11
|
+
import { Command } from "commander";
|
|
12
|
+
import { existsSync as existsSync4 } from "fs";
|
|
13
|
+
import { join as join4 } from "path";
|
|
14
|
+
|
|
15
|
+
// src/load-catalogue.ts
|
|
16
|
+
import { readFileSync } from "fs";
|
|
17
|
+
import { resolve } from "path";
|
|
18
|
+
function loadCatalogue() {
|
|
19
|
+
const cataloguePath = resolve(__dirname, "..", "public", "catalogue.json");
|
|
20
|
+
let file;
|
|
21
|
+
try {
|
|
22
|
+
file = readFileSync(cataloguePath, "utf8");
|
|
23
|
+
} catch (err) {
|
|
24
|
+
throw new Error(`Could not read ${cataloguePath}: ${getErrorMessage(err)}`);
|
|
25
|
+
}
|
|
26
|
+
let catalogue;
|
|
27
|
+
try {
|
|
28
|
+
catalogue = JSON.parse(file);
|
|
29
|
+
} catch (err) {
|
|
30
|
+
throw new Error(
|
|
31
|
+
`Failed to parse JSON at ${cataloguePath}: ${getErrorMessage(err)}`
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
return catalogue;
|
|
35
|
+
}
|
|
36
|
+
function getErrorMessage(err) {
|
|
37
|
+
if (err instanceof Error) return err.message;
|
|
38
|
+
if (typeof err === "string") return err;
|
|
39
|
+
try {
|
|
40
|
+
return JSON.stringify(err);
|
|
41
|
+
} catch {
|
|
42
|
+
return String(err);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// src/install-snippets.ts
|
|
47
|
+
import { simpleGit } from "simple-git";
|
|
48
|
+
import { tmpdir } from "os";
|
|
49
|
+
import { cpSync as cpSync2, existsSync as existsSync3 } from "fs";
|
|
50
|
+
import { join as join3 } from "path";
|
|
51
|
+
|
|
52
|
+
// src/read-config.ts
|
|
53
|
+
import { existsSync, readFileSync as readFileSync2 } from "fs";
|
|
54
|
+
import { join } from "path";
|
|
55
|
+
function readConfig(cwd = process.cwd()) {
|
|
56
|
+
const defaultConfig = {
|
|
57
|
+
outDir: "src/components/ui",
|
|
58
|
+
override: true
|
|
59
|
+
};
|
|
60
|
+
const configPath = join(cwd, "components.json");
|
|
61
|
+
if (!existsSync(configPath)) {
|
|
62
|
+
return defaultConfig;
|
|
63
|
+
}
|
|
64
|
+
const config = JSON.parse(
|
|
65
|
+
readFileSync2(configPath, "utf-8")
|
|
66
|
+
);
|
|
67
|
+
return {
|
|
68
|
+
...defaultConfig,
|
|
69
|
+
...config
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// src/copy-components.ts
|
|
74
|
+
import {
|
|
75
|
+
readdirSync,
|
|
76
|
+
readFileSync as readFileSync3,
|
|
77
|
+
writeFileSync,
|
|
78
|
+
existsSync as existsSync2,
|
|
79
|
+
cpSync
|
|
80
|
+
} from "fs";
|
|
81
|
+
import { join as join2 } from "path";
|
|
82
|
+
function copyComponents({
|
|
83
|
+
templateDir,
|
|
84
|
+
outputDir,
|
|
85
|
+
versionComment,
|
|
86
|
+
override = true,
|
|
87
|
+
ids
|
|
88
|
+
}) {
|
|
89
|
+
if (!ids) {
|
|
90
|
+
if (existsSync2(outputDir) && !override) {
|
|
91
|
+
throw new Error(
|
|
92
|
+
`\u51FA\u529B\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u65E2\u306B\u5B58\u5728\u3057\u307E\u3059: ${outputDir}. --override\u3092\u4F7F\u7528\u3057\u3066\u4E0A\u66F8\u304D\u3057\u3066\u304F\u3060\u3055\u3044\u3002`
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
cpSync(templateDir, outputDir, { recursive: true });
|
|
96
|
+
const dirs = readdirSync(outputDir, { withFileTypes: true });
|
|
97
|
+
for (const dir of dirs) {
|
|
98
|
+
if (dir.isDirectory()) {
|
|
99
|
+
const destDir = join2(outputDir, dir.name);
|
|
100
|
+
const files = readdirSync(destDir, { withFileTypes: true });
|
|
101
|
+
for (const file of files) {
|
|
102
|
+
if (file.isFile() && file.name.endsWith(".tsx")) {
|
|
103
|
+
const destPath = join2(destDir, file.name);
|
|
104
|
+
const content = readFileSync3(destPath, "utf8");
|
|
105
|
+
if (versionComment && content.startsWith(versionComment)) continue;
|
|
106
|
+
writeFileSync(destPath, (versionComment || "") + content, "utf8");
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
if (existsSync2(outputDir) && !override) {
|
|
114
|
+
throw new Error(
|
|
115
|
+
`\u51FA\u529B\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u65E2\u306B\u5B58\u5728\u3057\u307E\u3059: ${outputDir}. --override\u3092\u4F7F\u7528\u3057\u3066\u4E0A\u66F8\u304D\u3057\u3066\u304F\u3060\u3055\u3044\u3002`
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
for (const id of ids) {
|
|
119
|
+
const src = join2(templateDir, id);
|
|
120
|
+
if (!existsSync2(src)) {
|
|
121
|
+
throw new Error(
|
|
122
|
+
`\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${id} (expected at ${src})`
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
const dest = join2(outputDir, id);
|
|
126
|
+
if (existsSync2(dest) && !override) {
|
|
127
|
+
throw new Error(
|
|
128
|
+
`\u51FA\u529B\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u65E2\u306B\u5B58\u5728\u3057\u307E\u3059: ${dest}. --override\u3092\u4F7F\u7528\u3057\u3066\u4E0A\u66F8\u304D\u3057\u3066\u304F\u3060\u3055\u3044\u3002`
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
cpSync(src, dest, { recursive: true });
|
|
132
|
+
const destFiles = readdirSync(dest, { withFileTypes: true });
|
|
133
|
+
for (const file of destFiles) {
|
|
134
|
+
if (file.isFile() && file.name.endsWith(".tsx")) {
|
|
135
|
+
const destPath = join2(dest, file.name);
|
|
136
|
+
const content = readFileSync3(destPath, "utf8");
|
|
137
|
+
if (versionComment && content.startsWith(versionComment)) continue;
|
|
138
|
+
writeFileSync(destPath, (versionComment || "") + content, "utf8");
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// src/version-comment.ts
|
|
145
|
+
function createVersionComment({
|
|
146
|
+
tag,
|
|
147
|
+
commit
|
|
148
|
+
} = {}) {
|
|
149
|
+
if (!tag || !commit) {
|
|
150
|
+
return "// Generated from Custom Source Directory\n";
|
|
151
|
+
}
|
|
152
|
+
return `// Generated from digital-go-design-system-with-panda@${tag} (commit: ${commit})
|
|
153
|
+
`;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// src/install-snippets.ts
|
|
157
|
+
async function main(args) {
|
|
158
|
+
const cwd = process.cwd();
|
|
159
|
+
const { outDir, sourceDir, override } = readConfig(cwd);
|
|
160
|
+
const tmpPath = join3(tmpdir(), `digital-go-pandacss-${Date.now()}`);
|
|
161
|
+
let templateDir = void 0;
|
|
162
|
+
let versionComment = void 0;
|
|
163
|
+
if (sourceDir) {
|
|
164
|
+
cpSync2(join3(cwd, sourceDir), tmpPath, { recursive: true });
|
|
165
|
+
templateDir = tmpPath;
|
|
166
|
+
versionComment = createVersionComment();
|
|
167
|
+
} else {
|
|
168
|
+
const git = simpleGit();
|
|
169
|
+
const repoUrl = "https://github.com/cieloazul310/digital-go-design-system-with-panda";
|
|
170
|
+
const templateSubdir = "components/src";
|
|
171
|
+
await git.clone(repoUrl, tmpPath);
|
|
172
|
+
const repoGit = simpleGit(tmpPath);
|
|
173
|
+
const tag = (await repoGit.raw(["describe", "--tags", "--abbrev=0"])).trim();
|
|
174
|
+
const commit = (await repoGit.revparse(["HEAD"])).trim();
|
|
175
|
+
templateDir = join3(tmpPath, templateSubdir);
|
|
176
|
+
versionComment = createVersionComment({ tag, commit });
|
|
177
|
+
}
|
|
178
|
+
if (!existsSync3(templateDir)) {
|
|
179
|
+
throw new Error(`\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${templateDir}`);
|
|
180
|
+
}
|
|
181
|
+
const outputDir = join3(cwd, outDir);
|
|
182
|
+
const idsToCopy = args && args.length > 0 ? args : void 0;
|
|
183
|
+
copyComponents({
|
|
184
|
+
templateDir,
|
|
185
|
+
outputDir,
|
|
186
|
+
override,
|
|
187
|
+
versionComment,
|
|
188
|
+
ids: idsToCopy
|
|
189
|
+
});
|
|
190
|
+
console.log(`\u2705 UI\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092 ${outDir} \u306B\u751F\u6210\u3057\u307E\u3057\u305F`);
|
|
191
|
+
}
|
|
192
|
+
async function installSnippets(args) {
|
|
193
|
+
await main(args).then(() => process.exit(0)).catch((err) => {
|
|
194
|
+
console.error(err);
|
|
195
|
+
process.exit(1);
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// src/index.ts
|
|
200
|
+
var program = new Command();
|
|
201
|
+
program.name("digital-go-pandacss").description("\u30C7\u30B8\u30BF\u30EB\u5E81\u30C7\u30B6\u30A4\u30F3\u30B7\u30B9\u30C6\u30E0 for Panda CSS");
|
|
202
|
+
program.command("install [ids...]").description("\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3059\u308B\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092\u6307\u5B9A\u3057\u307E\u3059").option("--all", "\u3059\u3079\u3066\u306E\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3057\u307E\u3059").action(async (ids = [], options) => {
|
|
203
|
+
if (options.all && ids.length > 0) {
|
|
204
|
+
console.error("\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8ID\u3068--all\u3092\u540C\u6642\u306B\u6307\u5B9A\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093");
|
|
205
|
+
process.exit(2);
|
|
206
|
+
}
|
|
207
|
+
if (!options.all && ids.length === 0) {
|
|
208
|
+
console.error("\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8ID\u3092\u6307\u5B9A\u3059\u308B\u304B\u3001--all\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044");
|
|
209
|
+
process.exit(2);
|
|
210
|
+
}
|
|
211
|
+
const catalogue = loadCatalogue() ?? { components: {} };
|
|
212
|
+
const availableIds = Object.values(catalogue.components || {}).map(
|
|
213
|
+
({ id }) => id
|
|
214
|
+
);
|
|
215
|
+
const targetIds = options.all ? availableIds : ids;
|
|
216
|
+
const unknown = targetIds.filter((id) => !availableIds.includes(id));
|
|
217
|
+
if (unknown.length) {
|
|
218
|
+
console.error("\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8ID\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093:", unknown.join(", "));
|
|
219
|
+
process.exit(2);
|
|
220
|
+
}
|
|
221
|
+
try {
|
|
222
|
+
const { outDir: cfgOutDir, override: cfgOverride } = readConfig(
|
|
223
|
+
process.cwd()
|
|
224
|
+
);
|
|
225
|
+
const outputPath = join4(process.cwd(), cfgOutDir);
|
|
226
|
+
if (existsSync4(outputPath) && !cfgOverride) {
|
|
227
|
+
console.error(
|
|
228
|
+
`\u51FA\u529B\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u65E2\u306B\u5B58\u5728\u3057\u307E\u3059: ${outputPath}. --override\u3092\u4F7F\u7528\u3057\u3066\u4E0A\u66F8\u304D\u3057\u3066\u304F\u3060\u3055\u3044\u3002`
|
|
229
|
+
);
|
|
230
|
+
process.exit(1);
|
|
231
|
+
}
|
|
232
|
+
await installSnippets(targetIds);
|
|
233
|
+
} catch (err) {
|
|
234
|
+
console.error(err);
|
|
235
|
+
process.exit(1);
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
program.command("list").description("\u5229\u7528\u53EF\u80FD\u306A\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8ID\u306E\u4E00\u89A7\u3092\u8868\u793A\u3057\u307E\u3059").option("--json", "JSON\u5F62\u5F0F\u3067\u51FA\u529B\u3057\u307E\u3059").action((options) => {
|
|
239
|
+
const catalogue = loadCatalogue();
|
|
240
|
+
if (!catalogue || !catalogue.components) {
|
|
241
|
+
console.error("\u30AB\u30BF\u30ED\u30B0\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093");
|
|
242
|
+
process.exit(1);
|
|
243
|
+
}
|
|
244
|
+
const comps = Object.values(catalogue.components);
|
|
245
|
+
if (options.json) {
|
|
246
|
+
console.log(JSON.stringify(comps, null, 2));
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
for (const { id, name } of comps) {
|
|
250
|
+
console.log(`${id} \u2014 ${name}`);
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
program.parse(process.argv);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cieloazul310/digital-go-pandacss-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/cieloazul310/digital-go-design-system-with-panda",
|
|
@@ -22,25 +22,27 @@
|
|
|
22
22
|
"public"
|
|
23
23
|
],
|
|
24
24
|
"bin": {
|
|
25
|
-
"
|
|
26
|
-
"update": "./bin/update.cjs"
|
|
25
|
+
"digital-go-pandacss": "./bin/index.cjs"
|
|
27
26
|
},
|
|
28
27
|
"scripts": {
|
|
28
|
+
"prebuild": "tsx ../../scripts/generate-catalogue.ts",
|
|
29
29
|
"build": "tsup",
|
|
30
30
|
"dev": "npm run build -- --watch",
|
|
31
31
|
"eslint": "eslint src --fix",
|
|
32
32
|
"format": "prettier --parser typescript --write ."
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
+
"commander": "^14.0.1",
|
|
35
36
|
"simple-git": "^3.28.0"
|
|
36
37
|
},
|
|
37
38
|
"devDependencies": {
|
|
38
|
-
"@repo/eslint-config": "^0.1.
|
|
39
|
-
"@repo/typescript-config": "^0.1.
|
|
40
|
-
"eslint": "^9.
|
|
39
|
+
"@repo/eslint-config": "^0.1.1",
|
|
40
|
+
"@repo/typescript-config": "^0.1.1",
|
|
41
|
+
"eslint": "^9.37.0",
|
|
41
42
|
"execa": "^9.6.0",
|
|
42
43
|
"tsup": "8.5.0",
|
|
43
|
-
"
|
|
44
|
+
"tsx": "^4.20.6",
|
|
45
|
+
"typescript": "^5.9.3"
|
|
44
46
|
},
|
|
45
47
|
"lint-staged": {
|
|
46
48
|
"**/*.{js,mjs,cjs,tsx,ts,tsx}": [
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
{
|
|
2
|
+
"components": {
|
|
3
|
+
"Accordion": {
|
|
4
|
+
"id": "accordion",
|
|
5
|
+
"name": "アコーディオン",
|
|
6
|
+
"className": "accordion",
|
|
7
|
+
"description": "アコーディオンは、ユーザーがコンテンツのセクションを展開または折りたたむことができるユーザーインタフェースです。",
|
|
8
|
+
"digitalgo": "https://design.digital.go.jp/components/accordion/",
|
|
9
|
+
"ark": "https://ark-ui.com/docs/components/accordion",
|
|
10
|
+
"storybook": "https://cieloazul310.github.io/digital-go-design-system-with-panda/?path=/docs/components-%E3%82%A2%E3%82%B3%E3%83%BC%E3%83%87%E3%82%A3%E3%82%AA%E3%83%B3--docs"
|
|
11
|
+
},
|
|
12
|
+
"Breadcrumb": {
|
|
13
|
+
"id": "breadcrumb",
|
|
14
|
+
"name": "パンくずリスト",
|
|
15
|
+
"className": "breadcrumb",
|
|
16
|
+
"description": "パンくずリストは、ウェブサイトの階層内でユーザーの現在の位置を表示します。",
|
|
17
|
+
"storybook": "https://cieloazul310.github.io/digital-go-design-system-with-panda/?path=/docs/components-%E3%83%91%E3%83%B3%E3%81%8F%E3%81%9A%E3%83%AA%E3%82%B9%E3%83%88--docs",
|
|
18
|
+
"digitalgo": "https://design.digital.go.jp/components/breadcrumb/"
|
|
19
|
+
},
|
|
20
|
+
"Button": {
|
|
21
|
+
"id": "button",
|
|
22
|
+
"name": "ボタン",
|
|
23
|
+
"className": "button",
|
|
24
|
+
"description": "ボタンは、主にアクション実行またはページ遷移のためのトリガーとして使用します。",
|
|
25
|
+
"storybook": "https://cieloazul310.github.io/digital-go-design-system-with-panda/?path=/docs/components-%E3%83%9C%E3%82%BF%E3%83%B3--docs",
|
|
26
|
+
"digitalgo": "https://design.digital.go.jp/components/button/"
|
|
27
|
+
},
|
|
28
|
+
"Card": {
|
|
29
|
+
"id": "card",
|
|
30
|
+
"name": "カード",
|
|
31
|
+
"className": "card",
|
|
32
|
+
"description": "カードは、単一の主題に関するコンテンツをまとめて表示するコンテナとなるコンポーネントです。",
|
|
33
|
+
"storybook": "https://cieloazul310.github.io/digital-go-design-system-with-panda/?path=/docs/components-%E3%82%AB%E3%83%BC%E3%83%89--docs",
|
|
34
|
+
"digitalgo": "https://design.digital.go.jp/components/card/"
|
|
35
|
+
},
|
|
36
|
+
"Checkbox": {
|
|
37
|
+
"id": "checkbox",
|
|
38
|
+
"name": "チェックボックス",
|
|
39
|
+
"className": "checkbox",
|
|
40
|
+
"description": "チェックボックスは、複数の項目の中から複数の選択肢を選ぶことを可能にします。",
|
|
41
|
+
"storybook": "https://cieloazul310.github.io/digital-go-design-system-with-panda/?path=/docs/components-%E3%83%81%E3%82%A7%E3%83%83%E3%82%AF%E3%83%9C%E3%83%83%E3%82%AF%E3%82%B9-%E3%82%B0%E3%83%AB%E3%83%BC%E3%83%97--docs",
|
|
42
|
+
"digitalgo": "https://design.digital.go.jp/components/checkbox/",
|
|
43
|
+
"ark": "https://ark-ui.com/docs/components/checkbox"
|
|
44
|
+
},
|
|
45
|
+
"ChipTag": {
|
|
46
|
+
"id": "chip-tag",
|
|
47
|
+
"name": "チップタグ",
|
|
48
|
+
"className": "chip-tag",
|
|
49
|
+
"description": "アイテム化した任意の情報を、表示・削除しやすくするための要素です。属性やユーザー情報をアイテムにして並べたり削除したりするような場合に有効です。",
|
|
50
|
+
"storybook": "https://cieloazul310.github.io/digital-go-design-system-with-panda/?path=/docs/components-チップタグ--docs",
|
|
51
|
+
"digitalgo": "https://design.digital.go.jp/components/chip-tag/"
|
|
52
|
+
},
|
|
53
|
+
"ChipLabel": {
|
|
54
|
+
"id": "chip-label",
|
|
55
|
+
"name": "チップラベル",
|
|
56
|
+
"className": "chip-label",
|
|
57
|
+
"description": "状態や状況を示すキーワードを表示して、情報の分類・整理の効率を向上させるグラフィック要素です。情報リストやテーブルの各行などのステータスを分かりやすく表示したい場合に有効です。",
|
|
58
|
+
"storybook": "https://cieloazul310.github.io/digital-go-design-system-with-panda/?path=/docs/components-%E3%83%81%E3%83%83%E3%83%97%E3%83%A9%E3%83%99%E3%83%AB--docs",
|
|
59
|
+
"digitalgo": "https://design.digital.go.jp/components/chip-label/"
|
|
60
|
+
},
|
|
61
|
+
"DatePicker": {
|
|
62
|
+
"id": "date-picker",
|
|
63
|
+
"name": "日付ピッカー/カレンダー",
|
|
64
|
+
"className": "date-picker",
|
|
65
|
+
"description": "日付ピッカーは、日付を選択するためのフォームコントロールを提供します。カレンダーは、日付の選択を補助するコンポーネントです。",
|
|
66
|
+
"storybook": "https://cieloazul310.github.io/digital-go-design-system-with-panda/?path=/docs/components-%E6%97%A5%E4%BB%98%E3%83%94%E3%83%83%E3%82%AB%E3%83%BC%EF%BC%8F%E3%82%AB%E3%83%AC%E3%83%B3%E3%83%80%E3%83%BC--docs",
|
|
67
|
+
"digitalgo": "https://design.digital.go.jp/components/date-picker/",
|
|
68
|
+
"ark": "https://ark-ui.com/docs/components/date-picker"
|
|
69
|
+
},
|
|
70
|
+
"Disclosure": {
|
|
71
|
+
"id": "disclosure",
|
|
72
|
+
"name": "ディスクロージャー",
|
|
73
|
+
"className": "disclosure",
|
|
74
|
+
"description": "ディスクロージャーは、コンテンツのセクション内の任意の範囲を折りたたむことができるユーザーインターフェースです。",
|
|
75
|
+
"storybook": "https://cieloazul310.github.io/digital-go-design-system-with-panda/?path=/docs/components-%E3%83%87%E3%82%A3%E3%82%B9%E3%82%AF%E3%83%AD%E3%83%BC%E3%82%B8%E3%83%A3%E3%83%BC--docs",
|
|
76
|
+
"digitalgo": "https://design.digital.go.jp/components/disclosure/",
|
|
77
|
+
"ark": "https://ark-ui.com/docs/components/collapsible"
|
|
78
|
+
},
|
|
79
|
+
"Divider": {
|
|
80
|
+
"id": "divider",
|
|
81
|
+
"name": "ディバイダー",
|
|
82
|
+
"className": "divider",
|
|
83
|
+
"description": "ディバイダーは、異なるセクション、コンポーネント、またはコンテンツのグループ間に設けられる視覚的な区切りです。",
|
|
84
|
+
"storybook": "https://cieloazul310.github.io/digital-go-design-system-with-panda/?path=/docs/components-%E3%83%87%E3%82%A3%E3%83%90%E3%82%A4%E3%83%80%E3%83%BC--docs",
|
|
85
|
+
"digitalgo": "https://design.digital.go.jp/components/divider/"
|
|
86
|
+
},
|
|
87
|
+
"Drawer": {
|
|
88
|
+
"id": "drawer",
|
|
89
|
+
"name": "ドロワー",
|
|
90
|
+
"className": "drawer",
|
|
91
|
+
"description": "ブラウザ画面の四辺(上下左右端)から展開し、モバイルメニューなどのコンポーネントを格納可能なコンテナです。",
|
|
92
|
+
"storybook": "https://cieloazul310.github.io/digital-go-design-system-with-panda/?path=/story/components-%E3%83%89%E3%83%AD%E3%83%AF%E3%83%BC--basic",
|
|
93
|
+
"digitalgo": "https://design.digital.go.jp/components/drawer/",
|
|
94
|
+
"ark": "https://ark-ui.com/docs/components/dialog"
|
|
95
|
+
},
|
|
96
|
+
"EmergencyBanner": {
|
|
97
|
+
"id": "emergency-banner",
|
|
98
|
+
"name": "緊急時バナー",
|
|
99
|
+
"className": "emergency-banner",
|
|
100
|
+
"description": "緊急時バナーは、当該ウェブサイトで本来成すべきコミュニケーションを中断してでもファーストビューを占有して注意を促すためのコンポーネントです。",
|
|
101
|
+
"storybook": "https://cieloazul310.github.io/digital-go-design-system-with-panda/?path=/docs/components-%E7%B7%8A%E6%80%A5%E6%99%82%E3%83%90%E3%83%8A%E3%83%BC--docs",
|
|
102
|
+
"digitalgo": "https://design.digital.go.jp/components/emergency-banner/"
|
|
103
|
+
},
|
|
104
|
+
"Field": {
|
|
105
|
+
"id": "field",
|
|
106
|
+
"name": "インプットテキスト",
|
|
107
|
+
"className": "field",
|
|
108
|
+
"description": "インプットテキストコンポーネントは、名前や電話番号など、1行以内のテキストを入力する場合に使用します。",
|
|
109
|
+
"storybook": "https://cieloazul310.github.io/digital-go-design-system-with-panda/?path=/docs/components-%E3%82%A4%E3%83%B3%E3%83%97%E3%83%83%E3%83%88%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88--docs",
|
|
110
|
+
"digitalgo": "https://design.digital.go.jp/components/input-text/",
|
|
111
|
+
"ark": "https://ark-ui.com/docs/components/field"
|
|
112
|
+
},
|
|
113
|
+
"HamburgerMenuButton": {
|
|
114
|
+
"id": "hamburger-menu-button",
|
|
115
|
+
"name": "ハンバーガーメニューボタン",
|
|
116
|
+
"className": "hamburger-menu-button",
|
|
117
|
+
"description": "ハンバーガーメニューボタンは画面スペース資源に制限のある、主にモバイルデバイスで使用されるモバイルメニューを表示するためのトリガーとなるボタンです。",
|
|
118
|
+
"storybook": "https://cieloazul310.github.io/digital-go-design-system-with-panda/?path=/docs/component-dads-v2-hamburgermenubutton--docs",
|
|
119
|
+
"digitalgo": "https://design.digital.go.jp/components/hamburger-menu-button/"
|
|
120
|
+
},
|
|
121
|
+
"Link": {
|
|
122
|
+
"id": "link",
|
|
123
|
+
"name": "リンク",
|
|
124
|
+
"className": "link",
|
|
125
|
+
"description": "「リンクテキスト」は通常、色や下線などの視覚的な表現で通常のテキストと区別され、リンクを持つテキスト要素です。",
|
|
126
|
+
"storybook": "https://cieloazul310.github.io/digital-go-design-system-with-panda/?path=/docs/components-%E3%83%AA%E3%83%B3%E3%82%AF--docs",
|
|
127
|
+
"digitalgo": "https://design.digital.go.jp/foundations/link-text/"
|
|
128
|
+
},
|
|
129
|
+
"NotificationBanner": {
|
|
130
|
+
"id": "notification-banner",
|
|
131
|
+
"name": "ノティフィケーションバナー",
|
|
132
|
+
"className": "notification-banner",
|
|
133
|
+
"description": "ウェブサイト全体に関わる、またはページや要素単位における重要度の高い情報を、ユーザーの操作に関わらず、ウェブサイト側からユーザーへ提示する場合に用いる通知バナーです。",
|
|
134
|
+
"storybook": "https://cieloazul310.github.io/digital-go-design-system-with-panda/?path=/docs/components-%E3%83%8E%E3%83%86%E3%82%A3%E3%83%95%E3%82%A3%E3%82%B1%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E3%83%90%E3%83%8A%E3%83%BC--docs",
|
|
135
|
+
"digitalgo": "https://design.digital.go.jp/components/notification-banner/"
|
|
136
|
+
},
|
|
137
|
+
"Progress": {
|
|
138
|
+
"id": "progress",
|
|
139
|
+
"name": "プログレスインジケーター",
|
|
140
|
+
"className": "progress",
|
|
141
|
+
"description": "プログレスインジケーターは、ユーザーのアクションに対して処理進行中であることを通知します。",
|
|
142
|
+
"storybook": "https://cieloazul310.github.io/digital-go-design-system-with-panda/?path=/story/components-%E3%83%97%E3%83%AD%E3%82%B0%E3%83%AC%E3%82%B9%E3%82%A4%E3%83%B3%E3%82%B8%E3%82%B1%E3%83%BC%E3%82%BF%E3%83%BC--docs",
|
|
143
|
+
"digitalgo": "https://design.digital.go.jp/components/progress-indicator/"
|
|
144
|
+
},
|
|
145
|
+
"ResourceList": {
|
|
146
|
+
"id": "resource-list",
|
|
147
|
+
"name": "リソースリスト",
|
|
148
|
+
"className": "resource-list",
|
|
149
|
+
"description": "リソースリストは、共通した複数の任意情報で構成されたオブジェクトのリストを表示します。",
|
|
150
|
+
"storybook": "https://cieloazul310.github.io/digital-go-design-system-with-panda/?path=/docs/components-%E3%83%AA%E3%82%BD%E3%83%BC%E3%82%B9%E3%83%AA%E3%82%B9%E3%83%88--docs",
|
|
151
|
+
"digitalgo": "https://design.digital.go.jp/components/resource-list/"
|
|
152
|
+
},
|
|
153
|
+
"Select": {
|
|
154
|
+
"id": "select",
|
|
155
|
+
"name": "セレクトボックス",
|
|
156
|
+
"className": "select",
|
|
157
|
+
"description": "セレクトボックスは、複数の選択肢を提供するフォームコントロールです。",
|
|
158
|
+
"storybook": "https://cieloazul310.github.io/digital-go-design-system-with-panda/?path=/docs/components-%E3%82%BB%E3%83%AC%E3%82%AF%E3%83%88%E3%83%9C%E3%83%83%E3%82%AF%E3%82%B9--docs",
|
|
159
|
+
"digitalgo": "https://design.digital.go.jp/components/select/",
|
|
160
|
+
"ark": "https://ark-ui.com/docs/components/select"
|
|
161
|
+
},
|
|
162
|
+
"Table": {
|
|
163
|
+
"id": "table",
|
|
164
|
+
"name": "テーブル/データテーブル",
|
|
165
|
+
"className": "table",
|
|
166
|
+
"description": "テーブルは、データや情報を行と列の組み合わせで構造化された表組です。",
|
|
167
|
+
"storybook": "https://cieloazul310.github.io/digital-go-design-system-with-panda/?path=/docs/components-%E3%83%86%E3%83%BC%E3%83%96%E3%83%AB--docs",
|
|
168
|
+
"digitalgo": "https://design.digital.go.jp/components/table/"
|
|
169
|
+
},
|
|
170
|
+
"Tabs": {
|
|
171
|
+
"id": "tabs",
|
|
172
|
+
"name": "タブ",
|
|
173
|
+
"className": "tabs",
|
|
174
|
+
"storybook": "https://cieloazul310.github.io/digital-go-design-system-with-panda/?path=/docs/components-%E3%83%86%E3%83%BC%E3%83%96%E3%83%AB--docs",
|
|
175
|
+
"ark": "https://ark-ui.com/docs/components/tabs"
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
package/bin/add-snippets.cjs
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
|
|
4
|
-
// src/add-snippets.ts
|
|
5
|
-
var import_simple_git = require("simple-git");
|
|
6
|
-
var import_os = require("os");
|
|
7
|
-
var import_fs3 = require("fs");
|
|
8
|
-
var import_path3 = require("path");
|
|
9
|
-
|
|
10
|
-
// src/read-config.ts
|
|
11
|
-
var import_fs = require("fs");
|
|
12
|
-
var import_path = require("path");
|
|
13
|
-
function readConfig(cwd = process.cwd()) {
|
|
14
|
-
const defaultConfig = {
|
|
15
|
-
outDir: "src/components/ui",
|
|
16
|
-
override: true
|
|
17
|
-
};
|
|
18
|
-
const configPath = (0, import_path.join)(cwd, "components.json");
|
|
19
|
-
if (!(0, import_fs.existsSync)(configPath)) {
|
|
20
|
-
return defaultConfig;
|
|
21
|
-
}
|
|
22
|
-
const config = JSON.parse(
|
|
23
|
-
(0, import_fs.readFileSync)(configPath, "utf-8")
|
|
24
|
-
);
|
|
25
|
-
return {
|
|
26
|
-
...defaultConfig,
|
|
27
|
-
...config
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// src/copy-components.ts
|
|
32
|
-
var import_fs2 = require("fs");
|
|
33
|
-
var import_path2 = require("path");
|
|
34
|
-
function copyComponents({
|
|
35
|
-
templateDir,
|
|
36
|
-
outputDir,
|
|
37
|
-
versionComment,
|
|
38
|
-
override = true
|
|
39
|
-
}) {
|
|
40
|
-
if ((0, import_fs2.existsSync)(outputDir) && !override) {
|
|
41
|
-
throw new Error(
|
|
42
|
-
`Output directory already exists: ${outputDir}. Use --override to overwrite.`
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
const files = (0, import_fs2.readdirSync)(templateDir, { withFileTypes: true });
|
|
46
|
-
for (const file of files) {
|
|
47
|
-
if (file.isFile() && file.name.endsWith(".tsx") && versionComment) {
|
|
48
|
-
const filePath = (0, import_path2.join)(templateDir, file.name);
|
|
49
|
-
const content = (0, import_fs2.readFileSync)(filePath, "utf8");
|
|
50
|
-
(0, import_fs2.writeFileSync)(filePath, versionComment + content, "utf8");
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
(0, import_fs2.cpSync)(templateDir, outputDir, { recursive: true });
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// src/add-snippets.ts
|
|
57
|
-
async function main() {
|
|
58
|
-
const cwd = process.cwd();
|
|
59
|
-
const { outDir, sourceDir, override } = readConfig(cwd);
|
|
60
|
-
let templateDir = sourceDir ? (0, import_path3.join)(cwd, sourceDir) : void 0;
|
|
61
|
-
if (!templateDir) {
|
|
62
|
-
const git = (0, import_simple_git.simpleGit)();
|
|
63
|
-
const repoUrl = "https://github.com/cieloazul310/digital-go-design-system-with-panda";
|
|
64
|
-
const templateSubdir = "components/src";
|
|
65
|
-
const tmpPath = (0, import_path3.join)((0, import_os.tmpdir)(), `digital-go-pandacss-${Date.now()}`);
|
|
66
|
-
await git.clone(repoUrl, tmpPath);
|
|
67
|
-
const repoGit = (0, import_simple_git.simpleGit)(tmpPath);
|
|
68
|
-
const tag = (await repoGit.raw(["describe", "--tags", "--abbrev=0"])).trim();
|
|
69
|
-
const commit = (await repoGit.revparse(["HEAD"])).trim();
|
|
70
|
-
templateDir = (0, import_path3.join)(tmpPath, templateSubdir);
|
|
71
|
-
const files = (0, import_fs3.readdirSync)(templateDir, { withFileTypes: true });
|
|
72
|
-
for (const file of files) {
|
|
73
|
-
if (file.isFile() && file.name.endsWith(".tsx")) {
|
|
74
|
-
const filePath = (0, import_path3.join)(templateDir, file.name);
|
|
75
|
-
const content = (0, import_fs3.readFileSync)(filePath, "utf8");
|
|
76
|
-
const versionComment = `// Generated from digital-go-design-system-with-panda@${tag} (commit: ${commit})
|
|
77
|
-
`;
|
|
78
|
-
(0, import_fs3.writeFileSync)(filePath, versionComment + content, "utf8");
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
if (!(0, import_fs3.existsSync)(templateDir)) {
|
|
83
|
-
throw new Error(`Template directory not found: ${templateDir}`);
|
|
84
|
-
}
|
|
85
|
-
const outputDir = (0, import_path3.join)(cwd, outDir);
|
|
86
|
-
copyComponents({
|
|
87
|
-
templateDir,
|
|
88
|
-
outputDir,
|
|
89
|
-
override
|
|
90
|
-
});
|
|
91
|
-
console.log(`\u2705 UI components generated from GitHub at ${outDir}`);
|
|
92
|
-
}
|
|
93
|
-
main().then(() => process.exit(0)).catch((err) => {
|
|
94
|
-
console.error(err);
|
|
95
|
-
process.exit(1);
|
|
96
|
-
});
|
package/bin/add-snippets.js
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
// src/add-snippets.ts
|
|
4
|
-
import { simpleGit } from "simple-git";
|
|
5
|
-
import { tmpdir } from "os";
|
|
6
|
-
import { existsSync as existsSync3, readFileSync as readFileSync3, readdirSync as readdirSync2, writeFileSync as writeFileSync2 } from "fs";
|
|
7
|
-
import { join as join3 } from "path";
|
|
8
|
-
|
|
9
|
-
// src/read-config.ts
|
|
10
|
-
import { existsSync, readFileSync } from "fs";
|
|
11
|
-
import { join } from "path";
|
|
12
|
-
function readConfig(cwd = process.cwd()) {
|
|
13
|
-
const defaultConfig = {
|
|
14
|
-
outDir: "src/components/ui",
|
|
15
|
-
override: true
|
|
16
|
-
};
|
|
17
|
-
const configPath = join(cwd, "components.json");
|
|
18
|
-
if (!existsSync(configPath)) {
|
|
19
|
-
return defaultConfig;
|
|
20
|
-
}
|
|
21
|
-
const config = JSON.parse(
|
|
22
|
-
readFileSync(configPath, "utf-8")
|
|
23
|
-
);
|
|
24
|
-
return {
|
|
25
|
-
...defaultConfig,
|
|
26
|
-
...config
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// src/copy-components.ts
|
|
31
|
-
import {
|
|
32
|
-
readdirSync,
|
|
33
|
-
readFileSync as readFileSync2,
|
|
34
|
-
writeFileSync,
|
|
35
|
-
existsSync as existsSync2,
|
|
36
|
-
cpSync
|
|
37
|
-
} from "fs";
|
|
38
|
-
import { join as join2 } from "path";
|
|
39
|
-
function copyComponents({
|
|
40
|
-
templateDir,
|
|
41
|
-
outputDir,
|
|
42
|
-
versionComment,
|
|
43
|
-
override = true
|
|
44
|
-
}) {
|
|
45
|
-
if (existsSync2(outputDir) && !override) {
|
|
46
|
-
throw new Error(
|
|
47
|
-
`Output directory already exists: ${outputDir}. Use --override to overwrite.`
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
const files = readdirSync(templateDir, { withFileTypes: true });
|
|
51
|
-
for (const file of files) {
|
|
52
|
-
if (file.isFile() && file.name.endsWith(".tsx") && versionComment) {
|
|
53
|
-
const filePath = join2(templateDir, file.name);
|
|
54
|
-
const content = readFileSync2(filePath, "utf8");
|
|
55
|
-
writeFileSync(filePath, versionComment + content, "utf8");
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
cpSync(templateDir, outputDir, { recursive: true });
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// src/add-snippets.ts
|
|
62
|
-
async function main() {
|
|
63
|
-
const cwd = process.cwd();
|
|
64
|
-
const { outDir, sourceDir, override } = readConfig(cwd);
|
|
65
|
-
let templateDir = sourceDir ? join3(cwd, sourceDir) : void 0;
|
|
66
|
-
if (!templateDir) {
|
|
67
|
-
const git = simpleGit();
|
|
68
|
-
const repoUrl = "https://github.com/cieloazul310/digital-go-design-system-with-panda";
|
|
69
|
-
const templateSubdir = "components/src";
|
|
70
|
-
const tmpPath = join3(tmpdir(), `digital-go-pandacss-${Date.now()}`);
|
|
71
|
-
await git.clone(repoUrl, tmpPath);
|
|
72
|
-
const repoGit = simpleGit(tmpPath);
|
|
73
|
-
const tag = (await repoGit.raw(["describe", "--tags", "--abbrev=0"])).trim();
|
|
74
|
-
const commit = (await repoGit.revparse(["HEAD"])).trim();
|
|
75
|
-
templateDir = join3(tmpPath, templateSubdir);
|
|
76
|
-
const files = readdirSync2(templateDir, { withFileTypes: true });
|
|
77
|
-
for (const file of files) {
|
|
78
|
-
if (file.isFile() && file.name.endsWith(".tsx")) {
|
|
79
|
-
const filePath = join3(templateDir, file.name);
|
|
80
|
-
const content = readFileSync3(filePath, "utf8");
|
|
81
|
-
const versionComment = `// Generated from digital-go-design-system-with-panda@${tag} (commit: ${commit})
|
|
82
|
-
`;
|
|
83
|
-
writeFileSync2(filePath, versionComment + content, "utf8");
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
if (!existsSync3(templateDir)) {
|
|
88
|
-
throw new Error(`Template directory not found: ${templateDir}`);
|
|
89
|
-
}
|
|
90
|
-
const outputDir = join3(cwd, outDir);
|
|
91
|
-
copyComponents({
|
|
92
|
-
templateDir,
|
|
93
|
-
outputDir,
|
|
94
|
-
override
|
|
95
|
-
});
|
|
96
|
-
console.log(`\u2705 UI components generated from GitHub at ${outDir}`);
|
|
97
|
-
}
|
|
98
|
-
main().then(() => process.exit(0)).catch((err) => {
|
|
99
|
-
console.error(err);
|
|
100
|
-
process.exit(1);
|
|
101
|
-
});
|
package/bin/update.cjs
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
|
|
4
|
-
// src/update.ts
|
|
5
|
-
var import_simple_git = require("simple-git");
|
|
6
|
-
var import_os = require("os");
|
|
7
|
-
var import_fs3 = require("fs");
|
|
8
|
-
var import_path3 = require("path");
|
|
9
|
-
|
|
10
|
-
// src/read-config.ts
|
|
11
|
-
var import_fs = require("fs");
|
|
12
|
-
var import_path = require("path");
|
|
13
|
-
function readConfig(cwd = process.cwd()) {
|
|
14
|
-
const defaultConfig = {
|
|
15
|
-
outDir: "src/components/ui",
|
|
16
|
-
override: true
|
|
17
|
-
};
|
|
18
|
-
const configPath = (0, import_path.join)(cwd, "components.json");
|
|
19
|
-
if (!(0, import_fs.existsSync)(configPath)) {
|
|
20
|
-
return defaultConfig;
|
|
21
|
-
}
|
|
22
|
-
const config = JSON.parse(
|
|
23
|
-
(0, import_fs.readFileSync)(configPath, "utf-8")
|
|
24
|
-
);
|
|
25
|
-
return {
|
|
26
|
-
...defaultConfig,
|
|
27
|
-
...config
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// src/copy-components.ts
|
|
32
|
-
var import_fs2 = require("fs");
|
|
33
|
-
var import_path2 = require("path");
|
|
34
|
-
function copyComponents({
|
|
35
|
-
templateDir,
|
|
36
|
-
outputDir,
|
|
37
|
-
versionComment,
|
|
38
|
-
override = true
|
|
39
|
-
}) {
|
|
40
|
-
if ((0, import_fs2.existsSync)(outputDir) && !override) {
|
|
41
|
-
throw new Error(
|
|
42
|
-
`Output directory already exists: ${outputDir}. Use --override to overwrite.`
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
const files = (0, import_fs2.readdirSync)(templateDir, { withFileTypes: true });
|
|
46
|
-
for (const file of files) {
|
|
47
|
-
if (file.isFile() && file.name.endsWith(".tsx") && versionComment) {
|
|
48
|
-
const filePath = (0, import_path2.join)(templateDir, file.name);
|
|
49
|
-
const content = (0, import_fs2.readFileSync)(filePath, "utf8");
|
|
50
|
-
(0, import_fs2.writeFileSync)(filePath, versionComment + content, "utf8");
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
(0, import_fs2.cpSync)(templateDir, outputDir, { recursive: true });
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// src/update.ts
|
|
57
|
-
async function main() {
|
|
58
|
-
const cwd = process.cwd();
|
|
59
|
-
const { outDir, sourceDir, override } = readConfig(cwd);
|
|
60
|
-
let templateDir = sourceDir ? (0, import_path3.join)(cwd, sourceDir) : void 0;
|
|
61
|
-
let latestTag = "";
|
|
62
|
-
let latestCommit = "";
|
|
63
|
-
if (!templateDir) {
|
|
64
|
-
const git = (0, import_simple_git.simpleGit)();
|
|
65
|
-
const repoUrl = "https://github.com/cieloazul310/digital-go-design-system-with-panda";
|
|
66
|
-
const templateSubdir = "components/src";
|
|
67
|
-
const tmpPath = (0, import_path3.join)((0, import_os.tmpdir)(), `digital-go-pandacss-${Date.now()}`);
|
|
68
|
-
await git.clone(repoUrl, tmpPath);
|
|
69
|
-
const repoGit = (0, import_simple_git.simpleGit)(tmpPath);
|
|
70
|
-
latestTag = (await repoGit.raw(["describe", "--tags", "--abbrev=0"])).trim();
|
|
71
|
-
latestCommit = (await repoGit.revparse(["HEAD"])).trim();
|
|
72
|
-
templateDir = (0, import_path3.join)(tmpPath, templateSubdir);
|
|
73
|
-
}
|
|
74
|
-
if (!(0, import_fs3.existsSync)(templateDir)) {
|
|
75
|
-
throw new Error(`Template directory not found: ${templateDir}`);
|
|
76
|
-
}
|
|
77
|
-
const outputDir = (0, import_path3.join)(cwd, outDir);
|
|
78
|
-
if (!(0, import_fs3.existsSync)(outputDir)) {
|
|
79
|
-
throw new Error(`Output directory not found: ${outputDir}`);
|
|
80
|
-
}
|
|
81
|
-
const versionComment = latestTag ? `// Generated from digital-go-design-system-with-panda@${latestTag} (commit: ${latestCommit})
|
|
82
|
-
` : void 0;
|
|
83
|
-
copyComponents({
|
|
84
|
-
templateDir,
|
|
85
|
-
outputDir,
|
|
86
|
-
versionComment,
|
|
87
|
-
override
|
|
88
|
-
});
|
|
89
|
-
console.log(`\u2705 UI components generated from GitHub at ${outDir}`);
|
|
90
|
-
}
|
|
91
|
-
main().then(() => process.exit(0)).catch((err) => {
|
|
92
|
-
console.error(err);
|
|
93
|
-
process.exit(1);
|
|
94
|
-
});
|
package/bin/update.js
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
// src/update.ts
|
|
4
|
-
import { simpleGit } from "simple-git";
|
|
5
|
-
import { tmpdir } from "os";
|
|
6
|
-
import { existsSync as existsSync3 } from "fs";
|
|
7
|
-
import { join as join3 } from "path";
|
|
8
|
-
|
|
9
|
-
// src/read-config.ts
|
|
10
|
-
import { existsSync, readFileSync } from "fs";
|
|
11
|
-
import { join } from "path";
|
|
12
|
-
function readConfig(cwd = process.cwd()) {
|
|
13
|
-
const defaultConfig = {
|
|
14
|
-
outDir: "src/components/ui",
|
|
15
|
-
override: true
|
|
16
|
-
};
|
|
17
|
-
const configPath = join(cwd, "components.json");
|
|
18
|
-
if (!existsSync(configPath)) {
|
|
19
|
-
return defaultConfig;
|
|
20
|
-
}
|
|
21
|
-
const config = JSON.parse(
|
|
22
|
-
readFileSync(configPath, "utf-8")
|
|
23
|
-
);
|
|
24
|
-
return {
|
|
25
|
-
...defaultConfig,
|
|
26
|
-
...config
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// src/copy-components.ts
|
|
31
|
-
import {
|
|
32
|
-
readdirSync,
|
|
33
|
-
readFileSync as readFileSync2,
|
|
34
|
-
writeFileSync,
|
|
35
|
-
existsSync as existsSync2,
|
|
36
|
-
cpSync
|
|
37
|
-
} from "fs";
|
|
38
|
-
import { join as join2 } from "path";
|
|
39
|
-
function copyComponents({
|
|
40
|
-
templateDir,
|
|
41
|
-
outputDir,
|
|
42
|
-
versionComment,
|
|
43
|
-
override = true
|
|
44
|
-
}) {
|
|
45
|
-
if (existsSync2(outputDir) && !override) {
|
|
46
|
-
throw new Error(
|
|
47
|
-
`Output directory already exists: ${outputDir}. Use --override to overwrite.`
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
const files = readdirSync(templateDir, { withFileTypes: true });
|
|
51
|
-
for (const file of files) {
|
|
52
|
-
if (file.isFile() && file.name.endsWith(".tsx") && versionComment) {
|
|
53
|
-
const filePath = join2(templateDir, file.name);
|
|
54
|
-
const content = readFileSync2(filePath, "utf8");
|
|
55
|
-
writeFileSync(filePath, versionComment + content, "utf8");
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
cpSync(templateDir, outputDir, { recursive: true });
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// src/update.ts
|
|
62
|
-
async function main() {
|
|
63
|
-
const cwd = process.cwd();
|
|
64
|
-
const { outDir, sourceDir, override } = readConfig(cwd);
|
|
65
|
-
let templateDir = sourceDir ? join3(cwd, sourceDir) : void 0;
|
|
66
|
-
let latestTag = "";
|
|
67
|
-
let latestCommit = "";
|
|
68
|
-
if (!templateDir) {
|
|
69
|
-
const git = simpleGit();
|
|
70
|
-
const repoUrl = "https://github.com/cieloazul310/digital-go-design-system-with-panda";
|
|
71
|
-
const templateSubdir = "components/src";
|
|
72
|
-
const tmpPath = join3(tmpdir(), `digital-go-pandacss-${Date.now()}`);
|
|
73
|
-
await git.clone(repoUrl, tmpPath);
|
|
74
|
-
const repoGit = simpleGit(tmpPath);
|
|
75
|
-
latestTag = (await repoGit.raw(["describe", "--tags", "--abbrev=0"])).trim();
|
|
76
|
-
latestCommit = (await repoGit.revparse(["HEAD"])).trim();
|
|
77
|
-
templateDir = join3(tmpPath, templateSubdir);
|
|
78
|
-
}
|
|
79
|
-
if (!existsSync3(templateDir)) {
|
|
80
|
-
throw new Error(`Template directory not found: ${templateDir}`);
|
|
81
|
-
}
|
|
82
|
-
const outputDir = join3(cwd, outDir);
|
|
83
|
-
if (!existsSync3(outputDir)) {
|
|
84
|
-
throw new Error(`Output directory not found: ${outputDir}`);
|
|
85
|
-
}
|
|
86
|
-
const versionComment = latestTag ? `// Generated from digital-go-design-system-with-panda@${latestTag} (commit: ${latestCommit})
|
|
87
|
-
` : void 0;
|
|
88
|
-
copyComponents({
|
|
89
|
-
templateDir,
|
|
90
|
-
outputDir,
|
|
91
|
-
versionComment,
|
|
92
|
-
override
|
|
93
|
-
});
|
|
94
|
-
console.log(`\u2705 UI components generated from GitHub at ${outDir}`);
|
|
95
|
-
}
|
|
96
|
-
main().then(() => process.exit(0)).catch((err) => {
|
|
97
|
-
console.error(err);
|
|
98
|
-
process.exit(1);
|
|
99
|
-
});
|