@cieloazul310/digital-go-pandacss-cli 0.1.3 → 0.1.4
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 +13 -1
- package/bin/index.js +14 -2
- package/package.json +3 -3
- package/public/catalogue.json +16 -0
package/bin/index.cjs
CHANGED
|
@@ -180,7 +180,19 @@ async function main(args) {
|
|
|
180
180
|
throw new Error(`\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${templateDir}`);
|
|
181
181
|
}
|
|
182
182
|
const outputDir = (0, import_path4.join)(cwd, outDir);
|
|
183
|
-
|
|
183
|
+
let idsToCopy = args && args.length > 0 ? args : void 0;
|
|
184
|
+
if (idsToCopy) {
|
|
185
|
+
const entries = await (0, import_promises5.readdir)(templateDir, { withFileTypes: true });
|
|
186
|
+
const available = entries.filter((e) => e.isDirectory()).map((d) => d.name);
|
|
187
|
+
const existing = idsToCopy.filter((id) => available.includes(id));
|
|
188
|
+
const missing = idsToCopy.filter((id) => !available.includes(id));
|
|
189
|
+
if (missing.length > 0) {
|
|
190
|
+
console.warn(
|
|
191
|
+
`Warning: the following components were listed in the catalogue but are not present in the template repository and will be skipped: ${missing.join(", ")}`
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
idsToCopy = existing.length > 0 ? existing : void 0;
|
|
195
|
+
}
|
|
184
196
|
await copyComponents({
|
|
185
197
|
templateDir,
|
|
186
198
|
outputDir,
|
package/bin/index.js
CHANGED
|
@@ -45,7 +45,7 @@ function getErrorMessage(err) {
|
|
|
45
45
|
// src/install-snippets.ts
|
|
46
46
|
import { simpleGit } from "simple-git";
|
|
47
47
|
import { tmpdir } from "os";
|
|
48
|
-
import { cp as cp2 } from "fs/promises";
|
|
48
|
+
import { cp as cp2, readdir as readdir2 } from "fs/promises";
|
|
49
49
|
import { join as join3 } from "path";
|
|
50
50
|
|
|
51
51
|
// src/read-config.ts
|
|
@@ -186,7 +186,19 @@ async function main(args) {
|
|
|
186
186
|
throw new Error(`\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${templateDir}`);
|
|
187
187
|
}
|
|
188
188
|
const outputDir = join3(cwd, outDir);
|
|
189
|
-
|
|
189
|
+
let idsToCopy = args && args.length > 0 ? args : void 0;
|
|
190
|
+
if (idsToCopy) {
|
|
191
|
+
const entries = await readdir2(templateDir, { withFileTypes: true });
|
|
192
|
+
const available = entries.filter((e) => e.isDirectory()).map((d) => d.name);
|
|
193
|
+
const existing = idsToCopy.filter((id) => available.includes(id));
|
|
194
|
+
const missing = idsToCopy.filter((id) => !available.includes(id));
|
|
195
|
+
if (missing.length > 0) {
|
|
196
|
+
console.warn(
|
|
197
|
+
`Warning: the following components were listed in the catalogue but are not present in the template repository and will be skipped: ${missing.join(", ")}`
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
idsToCopy = existing.length > 0 ? existing : void 0;
|
|
201
|
+
}
|
|
190
202
|
await copyComponents({
|
|
191
203
|
templateDir,
|
|
192
204
|
outputDir,
|
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.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/cieloazul310/digital-go-design-system-with-panda",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"simple-git": "^3.28.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@repo/eslint-config": "^0.1.
|
|
40
|
-
"@repo/typescript-config": "^0.1.
|
|
39
|
+
"@repo/eslint-config": "^0.1.4",
|
|
40
|
+
"@repo/typescript-config": "^0.1.4",
|
|
41
41
|
"eslint": "^9.37.0",
|
|
42
42
|
"execa": "^9.6.0",
|
|
43
43
|
"tsup": "8.5.0",
|
package/public/catalogue.json
CHANGED
|
@@ -9,6 +9,14 @@
|
|
|
9
9
|
"ark": "https://ark-ui.com/docs/components/accordion",
|
|
10
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
11
|
},
|
|
12
|
+
"Blockquote": {
|
|
13
|
+
"id": "blockquote",
|
|
14
|
+
"name": "引用ブロック",
|
|
15
|
+
"className": "blockquote",
|
|
16
|
+
"description": "引用ブロックは段落単位での引用を表し、これ自体も段落となるコンポーネントです。",
|
|
17
|
+
"storybook": "https://cieloazul310.github.io/digital-go-design-system-with-panda/?path=/docs/components-%E5%BC%95%E7%94%A8%E3%83%96%E3%83%AD%E3%83%83%E3%82%AF--docs",
|
|
18
|
+
"digitalgo": "https://design.digital.go.jp/dads/components/blockquote/"
|
|
19
|
+
},
|
|
12
20
|
"Breadcrumb": {
|
|
13
21
|
"id": "breadcrumb",
|
|
14
22
|
"name": "パンくずリスト",
|
|
@@ -67,6 +75,14 @@
|
|
|
67
75
|
"digitalgo": "https://design.digital.go.jp/dads/components/date-picker/",
|
|
68
76
|
"ark": "https://ark-ui.com/docs/components/date-picker"
|
|
69
77
|
},
|
|
78
|
+
"DescriptionList": {
|
|
79
|
+
"id": "description-list",
|
|
80
|
+
"name": "説明リスト",
|
|
81
|
+
"className": "description-list",
|
|
82
|
+
"description": "「説明したいこと」と「その説明文」のペアを1つの項目として数え、それが複数連なるようなコンテンツの時に使用します。",
|
|
83
|
+
"storybook": "https://cieloazul310.github.io/digital-go-design-system-with-panda/?path=/docs/components-%E8%AA%AC%E6%98%8E%E3%83%AA%E3%82%B9%E3%83%88--docs",
|
|
84
|
+
"digitalgo": "https://design.digital.go.jp/dads/components/description-list/"
|
|
85
|
+
},
|
|
70
86
|
"Disclosure": {
|
|
71
87
|
"id": "disclosure",
|
|
72
88
|
"name": "ディスクロージャー",
|