lism-cli 0.4.0 → 0.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/README.md +6 -3
- package/dist/{chunk-ZSHT6RXM.js → chunk-VMIN57OF.js} +15 -7
- package/dist/index.js +1 -1
- package/dist/lib.d.ts +2 -2
- package/dist/lib.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
## コマンド体系
|
|
10
10
|
|
|
11
11
|
```
|
|
12
|
-
lism create [targetDir] [--template <name>] # templates から新規プロジェクト
|
|
13
|
-
lism ui { init | add <names...> | list }
|
|
14
|
-
lism skill { add | check | update }
|
|
12
|
+
lism create [targetDir] [--template <name|category>] # templates から新規プロジェクト
|
|
13
|
+
lism ui { init | add <names...> | list } # Lism UI コンポーネントの追加
|
|
14
|
+
lism skill { add | check | update } # AI エージェント向け SKILL.md 配置
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
## 使い方
|
|
@@ -24,6 +24,9 @@ pnpm dlx lism-cli create
|
|
|
24
24
|
|
|
25
25
|
# テンプレート名・出力先を指定
|
|
26
26
|
pnpm dlx lism-cli create --template minimal-astro ./my-app
|
|
27
|
+
|
|
28
|
+
# カテゴリ名を指定(stack 以下の選択を対話で続行)
|
|
29
|
+
pnpm dlx lism-cli create --template minimal ./my-app
|
|
27
30
|
```
|
|
28
31
|
|
|
29
32
|
同じ動作は `pnpm create lism` / `npm create lism@latest` でも呼び出せます(`create-lism` パッケージ経由)。
|
|
@@ -21,8 +21,8 @@ var messages = {
|
|
|
21
21
|
en: "Target directory"
|
|
22
22
|
},
|
|
23
23
|
"cli.create.opt.template": {
|
|
24
|
-
ja: "\u4F7F\u7528\u3059\u308B\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u540D\uFF08\u4F8B: minimal-astro\uFF09",
|
|
25
|
-
en: "Template name to use (e.g. minimal-astro)"
|
|
24
|
+
ja: "\u4F7F\u7528\u3059\u308B\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u540D\u307E\u305F\u306F\u30AB\u30C6\u30B4\u30EA\u540D\uFF08\u4F8B: minimal-astro / minimal\uFF09",
|
|
25
|
+
en: "Template or category name to use (e.g. minimal-astro / minimal)"
|
|
26
26
|
},
|
|
27
27
|
"cli.create.opt.force": {
|
|
28
28
|
ja: "\u65E2\u5B58\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u5F37\u5236\u4E0A\u66F8\u304D",
|
|
@@ -548,7 +548,7 @@ var logger = {
|
|
|
548
548
|
|
|
549
549
|
// src/version.ts
|
|
550
550
|
var LISM_CSS_VERSION = "0.18.0" ? "0.18.0" : "unknown";
|
|
551
|
-
var CLI_VERSION = "0.4.
|
|
551
|
+
var CLI_VERSION = "0.4.1" ? "0.4.1" : "unknown";
|
|
552
552
|
|
|
553
553
|
// src/constants.ts
|
|
554
554
|
var SOURCE_REPO = "lism-css/lism-css";
|
|
@@ -704,10 +704,13 @@ async function createCommand(targetDir, options) {
|
|
|
704
704
|
async function resolveTemplate(requested, templates) {
|
|
705
705
|
if (requested) {
|
|
706
706
|
const found = templates.find((t2) => t2.slug === requested);
|
|
707
|
-
if (
|
|
708
|
-
|
|
707
|
+
if (found) return found;
|
|
708
|
+
const matchedCategory = CATEGORIES.find((category2) => category2.id === requested);
|
|
709
|
+
const categoryTemplates = matchedCategory ? templates.filter((tpl) => tpl.category === matchedCategory.id) : [];
|
|
710
|
+
if (matchedCategory && categoryTemplates.length > 0) {
|
|
711
|
+
return resolveFromCategory(matchedCategory.id, categoryTemplates);
|
|
709
712
|
}
|
|
710
|
-
|
|
713
|
+
throw new Error(t("create.templateNotFound", { name: requested, list: templates.map((x) => x.slug).join(", ") }));
|
|
711
714
|
}
|
|
712
715
|
const category = await select({
|
|
713
716
|
message: t("create.promptSelectCategory"),
|
|
@@ -716,7 +719,12 @@ async function resolveTemplate(requested, templates) {
|
|
|
716
719
|
value: category2.id
|
|
717
720
|
}))
|
|
718
721
|
});
|
|
719
|
-
|
|
722
|
+
return resolveFromCategory(
|
|
723
|
+
category,
|
|
724
|
+
templates.filter((tpl) => tpl.category === category)
|
|
725
|
+
);
|
|
726
|
+
}
|
|
727
|
+
async function resolveFromCategory(category, categoryTemplates) {
|
|
720
728
|
const stack = await resolveStack(categoryTemplates);
|
|
721
729
|
const stackTemplates = categoryTemplates.filter((tpl) => tpl.stack === stack);
|
|
722
730
|
const variant = await resolveVariant(category, stackTemplates);
|
package/dist/index.js
CHANGED
package/dist/lib.d.ts
CHANGED
|
@@ -37,8 +37,8 @@ declare const messages: {
|
|
|
37
37
|
readonly en: "Target directory";
|
|
38
38
|
};
|
|
39
39
|
readonly 'cli.create.opt.template': {
|
|
40
|
-
readonly ja: "
|
|
41
|
-
readonly en: "Template name to use (e.g. minimal-astro)";
|
|
40
|
+
readonly ja: "使用するテンプレート名またはカテゴリ名(例: minimal-astro / minimal)";
|
|
41
|
+
readonly en: "Template or category name to use (e.g. minimal-astro / minimal)";
|
|
42
42
|
};
|
|
43
43
|
readonly 'cli.create.opt.force': {
|
|
44
44
|
readonly ja: "既存ディレクトリを強制上書き";
|
package/dist/lib.js
CHANGED