cmx-sdk 0.2.9 → 0.2.11

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.
Files changed (43) hide show
  1. package/README.md +37 -1
  2. package/dist/add-studio-YUDYE2OH.js +0 -0
  3. package/dist/chunk-7TDMLYBI.js +0 -0
  4. package/dist/chunk-EDXXR5BE.js +0 -0
  5. package/dist/chunk-FPQYL5GE.js +0 -0
  6. package/dist/chunk-IIQLQIDP.js +0 -0
  7. package/dist/chunk-NZQ6SBFS.js +0 -0
  8. package/dist/{chunk-EZMBZWH7.js → chunk-Y3S3K6M3.js} +73 -28
  9. package/dist/cli.js +215 -3
  10. package/dist/init-FLRQXJX4.js +0 -0
  11. package/dist/{interactive-menu-FYVOQSTL.js → interactive-menu-PYMJB5LY.js} +4 -1
  12. package/dist/studio-HAS6DYLO.js +0 -0
  13. package/dist/{update-sdk-KJZ6VB4M.js → update-sdk-ZXMWQF3I.js} +2 -1
  14. package/dist/update-studio-TWCYSYIS.js +0 -0
  15. package/package.json +14 -16
  16. package/templates/AGENTS.md +0 -173
  17. package/templates/CLAUDE.md +0 -28
  18. package/templates/claude/commands/check.md +0 -64
  19. package/templates/claude/commands/next-action.md +0 -66
  20. package/templates/claude/skills/cmx-cache/SKILL.md +0 -50
  21. package/templates/claude/skills/cmx-cache/references/cache-patterns.md +0 -153
  22. package/templates/claude/skills/cmx-component/SKILL.md +0 -108
  23. package/templates/claude/skills/cmx-component/references/component-schema.md +0 -123
  24. package/templates/claude/skills/cmx-content/SKILL.md +0 -158
  25. package/templates/claude/skills/cmx-content/references/migration-patterns.md +0 -120
  26. package/templates/claude/skills/cmx-content/references/seed-patterns.md +0 -146
  27. package/templates/claude/skills/cmx-dev/SKILL.md +0 -266
  28. package/templates/claude/skills/cmx-dev/references/api-patterns.md +0 -220
  29. package/templates/claude/skills/cmx-dev/references/cli-reference.md +0 -54
  30. package/templates/claude/skills/cmx-form/SKILL.md +0 -103
  31. package/templates/claude/skills/cmx-form/references/form-template.md +0 -152
  32. package/templates/claude/skills/cmx-migrate/SKILL.md +0 -501
  33. package/templates/claude/skills/cmx-migrate/references/analysis-guide.md +0 -127
  34. package/templates/claude/skills/cmx-migrate/references/html-to-mdx.md +0 -99
  35. package/templates/claude/skills/cmx-migrate/references/intermediate-format.md +0 -196
  36. package/templates/claude/skills/cmx-migrate/references/tool-setup.md +0 -150
  37. package/templates/claude/skills/cmx-schema/SKILL.md +0 -159
  38. package/templates/claude/skills/cmx-schema/references/field-types.md +0 -164
  39. package/templates/claude/skills/cmx-schema/references/migration-scenarios.md +0 -44
  40. package/templates/claude/skills/cmx-seo/SKILL.md +0 -54
  41. package/templates/claude/skills/cmx-seo/references/seo-patterns.md +0 -216
  42. package/templates/claude/skills/cmx-style/SKILL.md +0 -48
  43. package/templates/claude/skills/cmx-style/references/style-patterns.md +0 -114
@@ -1,127 +0,0 @@
1
- # 解析ガイド
2
-
3
- Step 1(解析)でClaude自身が判断する際のルール。
4
-
5
- ## URLパターン → CMXタイプのマッピング
6
-
7
- ### コレクション候補の検出
8
-
9
- | URLパターン | 推定タイプ | 根拠 |
10
- |------------|----------|------|
11
- | `/blog/*`, `/posts/*`, `/articles/*` | post | ブログ記事 |
12
- | `/news/*`, `/updates/*`, `/press/*` | news | ニュース・お知らせ |
13
- | `/docs/*`, `/guide/*`, `/manual/*` | doc | ドキュメント |
14
- | `/about`, `/company`, `/services` | static-page | 固定ページ |
15
- | `/contact`, `/inquiry` | form | フォームページ |
16
- | `/products/*`, `/items/*` | data-type | 商品(データタイプ) |
17
- | `/team`, `/members`, `/staff` | data-type | メンバー(データタイプ) |
18
- | `/faq`, `/qa` | data-type | FAQ(データタイプ) |
19
-
20
- ### 一覧ページ vs 詳細ページの判定
21
-
22
- - 一覧ページ: URLがパターンのルート(`/blog`)で、ページ内に複数のリンクカードがある
23
- - 詳細ページ: URLがパターンの子(`/blog/post-1`)で、長い本文がある
24
-
25
- ### 固定ページ vs コレクションの判定
26
-
27
- - 固定ページ: 個別URLで、時系列でない、少数(1-3ページ)
28
- - コレクション: パターン化されたURLで、同じ構造のページが複数(5件以上)
29
-
30
- ## ページ構造の分析
31
-
32
- ### セクション検出
33
-
34
- 固定ページ(`/about` 等)はセクションに分割して分析:
35
-
36
- ```html
37
- <!-- セクションの境界を検出する目印 -->
38
- <section> → セクション区切り
39
- <div id="team"> → セクション「team」
40
- <h2>チーム</h2> → セクション見出し
41
- <hr> → セクション区切り
42
- ```
43
-
44
- 各セクションに対して:
45
- - どんなコンテンツか(テキスト、カード一覧、画像ギャラリー等)
46
- - データタイプに分離すべきか(繰り返しデータの場合)
47
- - MDXコンポーネントにすべきか(再利用可能なUIパターンの場合)
48
-
49
- ### 繰り返しデータの検出
50
-
51
- 同じ構造が3回以上繰り返される場合はデータタイプ候補:
52
-
53
- ```html
54
- <!-- このパターンが5回繰り返される → データタイプ候補 -->
55
- <div class="team-member">
56
- <img src="..." alt="...">
57
- <h3>名前</h3>
58
- <p>役職</p>
59
- </div>
60
- ```
61
-
62
- → データタイプ `staff`: name(text), position(text), photo(image)
63
-
64
- ### コンポーネント候補の検出
65
-
66
- 複数ページで共通して使われるUIパターン:
67
-
68
- - CTAバナー(タイトル + 説明 + ボタン)→ `<CTA>`
69
- - 特徴カード(アイコン + タイトル + 説明)→ `<FeatureCard>`
70
- - テスティモニアル(引用 + 名前 + 会社名)→ `<Testimonial>`
71
- - FAQ アコーディオン(質問 + 回答)→ `<FAQ>`
72
- - 画像ギャラリー → `<Gallery>`
73
- - 料金テーブル → `<PricingTable>`
74
-
75
- **判定基準:**
76
- - 2つ以上のページで同じパターンが使われている → コンポーネント候補
77
- - 記事本文内で使われる装飾要素 → MDXコンポーネント候補
78
- - ページレイアウトの一部 → React コンポーネント(src/components/)
79
-
80
- ## フォームの検出
81
-
82
- ```html
83
- <form>
84
- <input type="text" name="name" required> → { key: "name", type: "text", required: true }
85
- <input type="email" name="email" required> → { key: "email", type: "email", required: true }
86
- <textarea name="message"></textarea> → { key: "message", type: "textarea" }
87
- <select name="category"> → { key: "category", type: "select", options: [...] }
88
- <option>お問い合わせ</option>
89
- <option>採用について</option>
90
- </select>
91
- </form>
92
- ```
93
-
94
- ## スタイル情報の解釈
95
-
96
- ### カラーの分類
97
-
98
- computed style から取得した色を以下に分類:
99
-
100
- | 取得元 | 分類先 |
101
- |-------|-------|
102
- | body の background-color | background |
103
- | body の color | text |
104
- | a タグの color | primary(多くの場合) |
105
- | nav の background-color | 参考(ヘッダー色) |
106
- | ボタンの background-color | primary or accent |
107
-
108
- ### トーンの判定
109
-
110
- | 特徴 | トーン |
111
- |------|-------|
112
- | 白背景 + 青/グレーテキスト + サンセリフ | プロフェッショナル・クリーン |
113
- | ダーク背景 + 明るいテキスト | モダン・テック |
114
- | パステルカラー + 丸みのあるUI | カジュアル・フレンドリー |
115
- | 高コントラスト + 大きなタイポグラフィ | インパクト・ブランド重視 |
116
- | ミニマルデザイン + 余白多め | ミニマル・エレガント |
117
- | 写真多め + オーバーレイ | ビジュアル重視 |
118
-
119
- ### フォントの分類
120
-
121
- | フォント種類 | 用途推定 |
122
- |------------|---------|
123
- | Noto Sans JP, Hiragino | 日本語サイト標準 |
124
- | Inter, SF Pro | テック系 |
125
- | Playfair Display, Merriweather | エレガント・メディア系 |
126
- | Roboto, Open Sans | 汎用 |
127
- | モノスペース(JetBrains Mono等) | コード表示用 |
@@ -1,99 +0,0 @@
1
- # HTML → MDX 変換ルール
2
-
3
- 子エージェントがコンテンツ変換時に参照するルール。
4
-
5
- ## 基本変換テーブル
6
-
7
- | HTML | MDX |
8
- |------|-----|
9
- | `<h1>` | `# `(通常はtitleフィールドに抽出、本文には含めない) |
10
- | `<h2>` | `## ` |
11
- | `<h3>` | `### ` |
12
- | `<h4>` | `#### ` |
13
- | `<p>` | そのまま(タグ除去、前後に空行) |
14
- | `<strong>`, `<b>` | `**テキスト**` |
15
- | `<em>`, `<i>` | `*テキスト*` |
16
- | `<a href="url">` | `[テキスト](url)` |
17
- | `<ul><li>` | `- テキスト` |
18
- | `<ol><li>` | `1. テキスト` |
19
- | `<blockquote>` | `> テキスト` |
20
- | `<code>` | `` `テキスト` `` |
21
- | `<pre><code>` | ` ```lang\nコード\n``` ` |
22
- | `<img src="url" alt="text">` | `![text](url)` |
23
- | `<table>` | Markdown テーブル |
24
- | `<hr>` | `---` |
25
- | `<br>` | 改行(`\n`) |
26
-
27
- ## 除去するもの
28
-
29
- - `<script>` タグとその中身
30
- - `<style>` タグとその中身
31
- - `<iframe>` タグ(広告、埋め込み等)
32
- - `<nav>` タグ(ナビゲーション)
33
- - `<header>` タグ(サイト共通ヘッダー)
34
- - `<footer>` タグ(サイト共通フッター)
35
- - `<aside>` タグ(サイドバー)
36
- - `class` 属性、`id` 属性、`style` 属性
37
- - `data-*` 属性
38
- - コメント `<!-- ... -->`
39
- - 広告関連の要素
40
-
41
- ## URL 変換
42
-
43
- - 相対URL → 絶対URL に変換
44
- - `/images/photo.jpg` → `https://old-site.com/images/photo.jpg`
45
- - 内部リンクは移行先のパスに変換可能であれば変換
46
- - `/blog/post-1` → `/blog/post-1`(パスが同じなら変更不要)
47
- - 画像は外部URLのまま維持(後で Admin にアップロード可能)
48
-
49
- ## メタデータ抽出
50
-
51
- コンテンツ本文とは別に以下を抽出:
52
-
53
- | フィールド | 抽出元 |
54
- |-----------|-------|
55
- | title | `<h1>` or `<title>` |
56
- | description | `<meta name="description">` |
57
- | slug | URLパスの末尾部分(`/blog/my-post` → `my-post`) |
58
- | publishedAt | `<time>` or `<meta property="article:published_time">` |
59
- | thumbnail | `<meta property="og:image">` or 記事内最初の `<img>` |
60
-
61
- ## slug 生成ルール
62
-
63
- - URLパスの末尾セグメントを使用
64
- - `https://old-site.com/blog/2024/01/my-article` → `my-article`
65
- - 日本語URLの場合はローマ字化または英語化
66
- - 使用可能文字: 英数字、ハイフン
67
- - 重複チェック: 既存slugと衝突する場合は `-2`, `-3` を付加
68
-
69
- ## MDXコンポーネント置換
70
-
71
- 既存サイトのUIパターンがMDXコンポーネントとして定義されている場合、対応するHTMLをコンポーネントに置換する。
72
-
73
- ```html
74
- <!-- 移行元 -->
75
- <div class="feature-card">
76
- <span class="icon">✨</span>
77
- <h3>高速</h3>
78
- <p>パフォーマンスに優れています</p>
79
- </div>
80
- ```
81
-
82
- ```mdx
83
- <!-- 移行後 -->
84
- <FeatureCard icon="✨" title="高速">
85
- パフォーマンスに優れています
86
- </FeatureCard>
87
- ```
88
-
89
- ただし、コンポーネント置換は `src/components/custom/index.ts` に export されているもののみ使用可能。
90
-
91
- ## 品質チェック
92
-
93
- 変換後のMDXが以下を満たすか確認:
94
- - Markdownとして正しい構文か
95
- - 空行が適切に挿入されているか
96
- - リスト、テーブルのインデントが正しいか
97
- - コードブロックの言語指定があるか
98
- - 画像のalt属性が設定されているか
99
- - 不要なHTMLタグが残っていないか
@@ -1,196 +0,0 @@
1
- # 中間フォーマット定義
2
-
3
- ## site-map.json
4
-
5
- Step 1(解析)で生成し、Step 2(計画)以降で参照する構造化データ。
6
-
7
- ```json
8
- {
9
- "sourceUrl": "https://example.com",
10
- "analyzedAt": "2026-02-17",
11
-
12
- "navigation": {
13
- "primary": [
14
- { "label": "ブログ", "href": "/blog" },
15
- { "label": "会社概要", "href": "/about" },
16
- { "label": "お問い合わせ", "href": "/contact" }
17
- ],
18
- "footer": [
19
- { "label": "プライバシーポリシー", "href": "/privacy" }
20
- ]
21
- },
22
-
23
- "pageGroups": [
24
- {
25
- "pattern": "/blog/*",
26
- "type": "collection",
27
- "suggestedCmxType": "post",
28
- "suggestedSlug": "blog",
29
- "suggestedName": "ブログ",
30
- "listPage": "/blog",
31
- "sampleDetailPages": ["/blog/article-1", "/blog/article-2"],
32
- "totalCount": 25,
33
- "fields": [
34
- { "key": "title", "type": "text", "selector": "h1", "required": true },
35
- { "key": "date", "type": "date", "selector": "time" },
36
- { "key": "category", "type": "relation", "values": ["技術", "デザイン", "ビジネス"] },
37
- { "key": "tags", "type": "relation_multi", "values": ["Next.js", "TypeScript", "React"] },
38
- { "key": "thumbnail", "type": "image" },
39
- { "key": "author", "type": "text" },
40
- { "key": "body", "type": "richtext", "selector": "article" }
41
- ],
42
- "suggestedDataTypes": ["categories", "tags"]
43
- },
44
- {
45
- "pattern": "/news/*",
46
- "type": "collection",
47
- "suggestedCmxType": "news",
48
- "suggestedSlug": "news",
49
- "suggestedName": "お知らせ",
50
- "listPage": "/news",
51
- "sampleDetailPages": ["/news/announcement-1"],
52
- "totalCount": 15,
53
- "fields": [
54
- { "key": "title", "type": "text", "required": true },
55
- { "key": "date", "type": "date" },
56
- { "key": "category", "type": "relation", "values": ["プレスリリース", "イベント"] },
57
- { "key": "body", "type": "richtext" }
58
- ],
59
- "suggestedDataTypes": ["categories"]
60
- },
61
- {
62
- "pattern": "/about",
63
- "type": "static-page",
64
- "sections": [
65
- { "id": "hero", "description": "ヒーローセクション(キャッチコピー + CTA)" },
66
- { "id": "mission", "description": "ミッション・ビジョン" },
67
- { "id": "team", "description": "メンバー一覧(カード型、5名)" },
68
- { "id": "history", "description": "沿革タイムライン" }
69
- ]
70
- },
71
- {
72
- "pattern": "/contact",
73
- "type": "form",
74
- "fields": [
75
- { "key": "name", "type": "text", "label": "お名前", "required": true },
76
- { "key": "email", "type": "email", "label": "メールアドレス", "required": true },
77
- { "key": "company", "type": "text", "label": "会社名" },
78
- { "key": "message", "type": "textarea", "label": "お問い合わせ内容", "required": true }
79
- ]
80
- },
81
- {
82
- "pattern": "/faq",
83
- "type": "data-type-page",
84
- "suggestedSlug": "faq",
85
- "description": "アコーディオン型FAQ一覧"
86
- }
87
- ],
88
-
89
- "dataTypeCandidates": [
90
- {
91
- "slug": "staff",
92
- "name": "スタッフ",
93
- "source": "/about セクション #team",
94
- "entryCount": 5,
95
- "fields": [
96
- { "key": "name", "label": "名前", "type": "text", "required": true },
97
- { "key": "position", "label": "役職", "type": "text" },
98
- { "key": "bio", "label": "自己紹介", "type": "textarea" },
99
- { "key": "photo", "label": "写真", "type": "image" }
100
- ]
101
- },
102
- {
103
- "slug": "faq",
104
- "name": "よくある質問",
105
- "source": "/faq ページ",
106
- "entryCount": 12,
107
- "fields": [
108
- { "key": "question", "label": "質問", "type": "text", "required": true },
109
- { "key": "answer", "label": "回答", "type": "richtext", "required": true },
110
- { "key": "category", "label": "カテゴリ", "type": "select", "options": { "choices": ["一般", "料金", "技術"] } }
111
- ]
112
- }
113
- ],
114
-
115
- "componentCandidates": [
116
- {
117
- "name": "FeatureCard",
118
- "description": "3カラムの特徴紹介カード",
119
- "foundAt": ["/", "/about"],
120
- "props": [
121
- { "name": "icon", "type": "string", "description": "アイコン(絵文字)" },
122
- { "name": "title", "type": "string", "description": "タイトル", "required": true },
123
- { "name": "children", "type": "string", "description": "説明文", "required": true }
124
- ]
125
- },
126
- {
127
- "name": "CTA",
128
- "description": "コールトゥアクションバナー",
129
- "foundAt": ["/", "/about", "/blog"],
130
- "props": [
131
- { "name": "title", "type": "string", "required": true },
132
- { "name": "description", "type": "string" },
133
- { "name": "buttonText", "type": "string", "required": true },
134
- { "name": "buttonUrl", "type": "string", "required": true }
135
- ]
136
- }
137
- ],
138
-
139
- "style": {
140
- "colors": {
141
- "primary": "#2563eb",
142
- "secondary": "#64748b",
143
- "accent": "#f59e0b",
144
- "background": "#ffffff",
145
- "text": "#1e293b",
146
- "muted": "#f1f5f9"
147
- },
148
- "fonts": {
149
- "heading": "Noto Sans JP, sans-serif",
150
- "body": "Noto Sans JP, sans-serif",
151
- "code": "JetBrains Mono, monospace"
152
- },
153
- "fontSizes": {
154
- "h1": "2.5rem",
155
- "h2": "2rem",
156
- "body": "1rem"
157
- },
158
- "tone": "プロフェッショナル・クリーン",
159
- "layoutPattern": "container-centered",
160
- "cardStyle": "shadow-sm with rounded corners"
161
- }
162
- }
163
- ```
164
-
165
- ## migration-plan.json
166
-
167
- Step 2(計画)で生成。ユーザーと対話して確定した移行計画。
168
-
169
- site-map.json の「提案」をユーザーが承認・修正した「確定版」。
170
-
171
- ```json
172
- {
173
- "sourceUrl": "https://example.com",
174
- "confirmedAt": "2026-02-17",
175
- "collections": [...],
176
- "dataTypes": [...],
177
- "components": [...],
178
- "forms": [...],
179
- "routes": [...],
180
- "style": {...}
181
- }
182
- ```
183
-
184
- `site-map.json` との違い:
185
- - `pageGroups` → `collections` + `routes` に分解・確定
186
- - `suggestedCmxType` → `type` に確定
187
- - `dataTypeCandidates` → `dataTypes` に確定(不要なものは除外済み)
188
- - `componentCandidates` → `components` に確定(選択されたもののみ)
189
-
190
- ## build-result.json
191
-
192
- Step 3(構築)で生成。SDK コマンドで登録した結果のID一覧。
193
-
194
- ## content-result.json
195
-
196
- Step 4(コンテンツ投入)で生成。各バッチの結果を集約した投入結果。
@@ -1,150 +0,0 @@
1
- # ツールセットアップガイド
2
-
3
- ## Firecrawl CLI
4
-
5
- ### インストール
6
-
7
- ```bash
8
- npm install -g firecrawl-cli
9
- ```
10
-
11
- ### APIキー設定
12
-
13
- 1. https://firecrawl.dev でアカウント作成(無料枠: 500クレジット)
14
- 2. APIキーを取得
15
- 3. `.env.local`(または `.env`)に追加:
16
-
17
- ```
18
- FIRECRAWL_API_KEY=fc-your-api-key
19
- ```
20
-
21
- 4. firecrawl コマンド実行前に環境変数をシェルに読み込む:
22
-
23
- ```bash
24
- ENV_FILE=$( [ -f .env.local ] && echo .env.local || echo .env )
25
- set -a && source "$ENV_FILE" 2>/dev/null && set +a
26
- ```
27
-
28
- > **補足**: `firecrawl login --api-key fc-your-api-key` でCLI自体に認証情報を保存する方法もあるが、上記の環境変数読み込みで十分。
29
-
30
- ### セルフホスト(無料・無制限)
31
-
32
- APIクレジットを消費せず使いたい場合:
33
-
34
- ```bash
35
- git clone https://github.com/firecrawl/firecrawl.git
36
- cd firecrawl
37
- cp .env.example .env
38
- docker compose up -d
39
- ```
40
-
41
- セルフホスト時は `.env.local`(または `.env`)に接続先を指定:
42
-
43
- ```
44
- FIRECRAWL_API_URL=http://localhost:3002
45
- ```
46
-
47
- ### 主要コマンド
48
-
49
- ```bash
50
- # サイト内の全URLを発見(コンテンツ取得なし、高速)
51
- firecrawl map https://example.com --limit 1000 -o urls.json
52
-
53
- # サイト全体をクロール(Markdown取得)
54
- firecrawl crawl https://example.com --limit 200 --max-depth 3 --wait --progress -o crawl-result.json
55
-
56
- # 単一ページをスクレイプ(スクショ付き)
57
- firecrawl scrape https://example.com --format markdown,screenshot -o page.json
58
-
59
- # 構造化データ抽出(LLMが解析)
60
- firecrawl scrape https://example.com/blog --format json --json-prompt "Extract list items with their fields" -o structure.json
61
- ```
62
-
63
- ### クレジット消費目安
64
-
65
- | 操作 | クレジット消費 |
66
- |------|-------------|
67
- | map(URL発見) | 1クレジット/リクエスト |
68
- | scrape(単一ページ) | 1クレジット/ページ |
69
- | crawl(サイトクロール) | 1クレジット/ページ |
70
- | extract(構造化抽出) | 5クレジット/リクエスト |
71
-
72
- 無料枠 500 クレジットで中小サイト(〜200ページ)の移行が1回可能。
73
-
74
- ## agent-browser
75
-
76
- Claude Code に組み込みのスキルとして利用可能。追加インストール不要。
77
-
78
- ### 主要コマンド
79
-
80
- ```
81
- # ページを開く
82
- open https://example.com
83
-
84
- # スクリーンショット撮影
85
- screenshot output-path.png
86
-
87
- # DOMスナップショット(セマンティック構造)
88
- snapshot
89
-
90
- # JavaScript実行
91
- eval "document.title"
92
- eval "JSON.stringify(getComputedStyle(document.body))"
93
-
94
- # 要素クリック
95
- click @e5
96
-
97
- # テキスト取得
98
- text @e10
99
- ```
100
-
101
- ### スタイル情報抽出のパターン
102
-
103
- ```javascript
104
- // 主要な CSS 変数/カラーを一括取得
105
- eval "JSON.stringify({
106
- bodyBg: getComputedStyle(document.body).backgroundColor,
107
- bodyColor: getComputedStyle(document.body).color,
108
- bodyFont: getComputedStyle(document.body).fontFamily,
109
- bodyFontSize: getComputedStyle(document.body).fontSize,
110
- h1Font: document.querySelector('h1') ? getComputedStyle(document.querySelector('h1')).fontFamily : null,
111
- h1Size: document.querySelector('h1') ? getComputedStyle(document.querySelector('h1')).fontSize : null,
112
- h1Weight: document.querySelector('h1') ? getComputedStyle(document.querySelector('h1')).fontWeight : null,
113
- linkColor: document.querySelector('a') ? getComputedStyle(document.querySelector('a')).color : null,
114
- navBg: document.querySelector('nav') ? getComputedStyle(document.querySelector('nav')).backgroundColor : null,
115
- footerBg: document.querySelector('footer') ? getComputedStyle(document.querySelector('footer')).backgroundColor : null
116
- })"
117
- ```
118
-
119
- ## cmx-sdk CLI
120
-
121
- プロジェクト内蔵。`npx cmx-sdk` で実行。
122
-
123
- ### 移行で使用する主要コマンド
124
-
125
- <!-- cmx-sync:start id="skill-cmx-migrate-tool-setup-command-block" -->
126
- ```bash
127
- # スキーマ登録
128
- npx cmx-sdk create-collection --json '{...}'
129
- npx cmx-sdk create-data-type --json '{...}'
130
- npx cmx-sdk create-data-entry --type-slug staff --json '{...}'
131
-
132
- # コード生成
133
- npx cmx-sdk codegen types
134
- npx cmx-sdk codegen pages --template layered
135
-
136
- # コンテンツ投入
137
- npx cmx-sdk create-content --collection blog --json '{...}'
138
- npx cmx-sdk create-content --collection blog --file content.json
139
-
140
- # 参照設定
141
- npx cmx-sdk set-content-references --id {contentId} --json '{...}'
142
-
143
- # ステータス変更
144
- npx cmx-sdk request-review-content --id {contentId}
145
- npx cmx-sdk publish-content --id {contentId}
146
-
147
- # コンポーネント
148
- npx cmx-sdk components scaffold --name FeatureCard
149
- ```
150
- <!-- cmx-sync:end -->