Skip to content

Commit 941e6d1

Browse files
yhk1038claude
andcommitted
feat(cli): add --init option and unify config filename to trbconfig.yml
- Add `trc --init` command to initialize new t-ruby projects - Creates trbconfig.yml configuration file - Creates src/ and build/ directories - Skips existing files/directories without overwriting - Unify config filename to `trbconfig.yml` across the entire codebase - Changed from `.trb.yml` in implementation - Changed from `trc.yaml` in documentation website - Updated 40+ files including: - Ruby implementation (lib/t_ruby/config.rb) - Tests (spec/t_ruby/config_spec.rb, spec/e2e/integration_spec.rb) - Documentation (CLAUDE.md, .claude/spec/README*.md) - Editor configs (nvim, vim, vscode) - Website docs (t-ruby.github.io) - Bump version to 0.0.8 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent dcf5bf5 commit 941e6d1

File tree

17 files changed

+177
-29
lines changed

17 files changed

+177
-29
lines changed

.claude/spec/README.ja.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ t-rubyはRuby上で動作する**オプショナル/段階的型レイヤー(O
2828
2. **段階的導入可能** — 部分的な`.trb`導入→プロジェクト全体への移行が可能です。
2929
3. **TypeScriptレベルのDX** — 型システム、インターフェース、ジェネリクス、ユニオン/インターセクション、推論をサポート;IDE親和的。
3030
4. **RBS互換性** — t-rubyはRBSスーパーセットを目指し、投影時はRBSスコープに簡素化されます。
31-
5. **Ruby文化の尊重** — YAMLベース設定(`.trb.yml`);Ruby開発者に自然な文法。
31+
5. **Ruby文化の尊重** — YAMLベース設定(`trbconfig.yml`);Ruby開発者に自然な文法。
3232

3333
---
3434

@@ -40,7 +40,7 @@ t-rubyはRuby上で動作する**オプショナル/段階的型レイヤー(O
4040
| `.rb` | コンパイル済みRuby | Rubyランタイム用実行出力 |
4141
| `.rbs` | Rubyシグネチャ | RBSエコシステム連携、保守的な型投影 |
4242
| `.d.trb` | t-ruby宣言 | t-ruby高度な型を完全保存 |
43-
| `.trb.yml` | 設定ファイル | t-rubyコンパイル設定 |
43+
| `trbconfig.yml` | 設定ファイル | t-rubyコンパイル設定 |
4444

4545
---
4646

.claude/spec/README.ko.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ t-ruby는 Ruby 위에서 동작하는 **선택적 정적 타입 레이어(Option
2828
2. **점진적 도입 가능** — 부분적 `.trb` 도입 → 전체 프로젝트 전환이 가능합니다.
2929
3. **TypeScript 수준의 DX** — 타입 시스템, 인터페이스, 제네릭, 유니온/인터섹션, 추론 지원; IDE 친화적.
3030
4. **RBS 호환성** — t-ruby는 RBS 상위호환을 목표로 하며, 투영 시 RBS 범위로 단순화됩니다.
31-
5. **Ruby 문화 존중** — YAML 기반 설정 (`.trb.yml`); Ruby 개발자에게 자연스러운 문법.
31+
5. **Ruby 문화 존중** — YAML 기반 설정 (`trbconfig.yml`); Ruby 개발자에게 자연스러운 문법.
3232

3333
---
3434

@@ -40,7 +40,7 @@ t-ruby는 Ruby 위에서 동작하는 **선택적 정적 타입 레이어(Option
4040
| `.rb` | 컴파일된 Ruby | Ruby 런타임용 실행 결과물 |
4141
| `.rbs` | Ruby 시그니처 | RBS 생태계 연동, 보수적 타입 투영 |
4242
| `.d.trb` | t-ruby 선언 | t-ruby 고급 타입 완전 보존 |
43-
| `.trb.yml` | 설정 파일 | t-ruby 컴파일 설정 |
43+
| `trbconfig.yml` | 설정 파일 | t-ruby 컴파일 설정 |
4444

4545
---
4646

.claude/spec/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The language maintains Ruby's syntax and spirit while introducing TypeScript's d
2828
2. **Gradual adoption** — Partial `.trb` adoption → full project migration is possible.
2929
3. **TypeScript-level DX** — Supports type system, interfaces, generics, unions/intersections, inference; IDE-friendly.
3030
4. **RBS compatibility** — t-ruby aims for RBS superset; types are simplified to RBS scope when projected.
31-
5. **Respects Ruby culture** — YAML-based config (`.trb.yml`); syntax feels natural to Ruby developers.
31+
5. **Respects Ruby culture** — YAML-based config (`trbconfig.yml`); syntax feels natural to Ruby developers.
3232

3333
---
3434

@@ -40,7 +40,7 @@ The language maintains Ruby's syntax and spirit while introducing TypeScript's d
4040
| `.rb` | Compiled Ruby | Executable output for Ruby runtime |
4141
| `.rbs` | Ruby signature | RBS ecosystem integration, conservative type projection |
4242
| `.d.trb` | t-ruby declaration | Full t-ruby advanced types preserved |
43-
| `.trb.yml` | Config file | t-ruby compilation settings |
43+
| `trbconfig.yml` | Config file | t-ruby compilation settings |
4444

4545
---
4646

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ t-ruby is an experimental typed layer for Ruby, inspired by TypeScript. It compi
1818

1919
- **Source files:** `.trb` - t-ruby source code with type annotations
2020
- **Compiler:** `trc` - CLI tool that compiles t-ruby to Ruby
21-
- **Config:** `.trb.yml` - YAML-based project configuration
21+
- **Config:** `trbconfig.yml` - YAML-based project configuration
2222
- **Type erasure:** Type annotations are removed when compiling to `.rb`
2323
- **RBS compatibility:** t-ruby's type system is a superset of RBS; advanced types are simplified when projected to `.rbs`
2424

docs/neovim/en/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ If you prefer coc.nvim, add to `:CocConfig`:
115115
"command": "trc",
116116
"args": ["--lsp"],
117117
"filetypes": ["truby"],
118-
"rootPatterns": [".trb.yml", ".git/"]
118+
"rootPatterns": ["trbconfig.yml", ".git/"]
119119
}
120120
}
121121
}

docs/neovim/ja/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ coc.nvimを好む場合は、`:CocConfig`に追加:
115115
"command": "trc",
116116
"args": ["--lsp"],
117117
"filetypes": ["truby"],
118-
"rootPatterns": [".trb.yml", ".git/"]
118+
"rootPatterns": ["trbconfig.yml", ".git/"]
119119
}
120120
}
121121
}

docs/neovim/ko/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ coc.nvim을 선호한다면 `:CocConfig`에 추가:
115115
"command": "trc",
116116
"args": ["--lsp"],
117117
"filetypes": ["truby"],
118-
"rootPatterns": [".trb.yml", ".git/"]
118+
"rootPatterns": ["trbconfig.yml", ".git/"]
119119
}
120120
}
121121
}

editors/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Add the contents of `nvim/coc-settings.json` to your coc-settings:
123123
"command": "trc",
124124
"args": ["--lsp"],
125125
"filetypes": ["truby"],
126-
"rootPatterns": [".trb.yml", ".git/"]
126+
"rootPatterns": ["trbconfig.yml", ".git/"]
127127
}
128128
}
129129
}

editors/nvim/coc-settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"command": "trc",
55
"args": ["--lsp"],
66
"filetypes": ["truby"],
7-
"rootPatterns": [".trb.yml", ".git/"],
7+
"rootPatterns": ["trbconfig.yml", ".git/"],
88
"initializationOptions": {},
99
"settings": {}
1010
}

editors/nvim/lua/t-ruby-lsp.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ M.config = {
99
filetypes = { "truby", "trb" },
1010
root_dir = function(fname)
1111
local lspconfig = require("lspconfig")
12-
return lspconfig.util.root_pattern(".trb.yml", ".git")(fname)
12+
return lspconfig.util.root_pattern("trbconfig.yml", ".git")(fname)
1313
or lspconfig.util.find_git_ancestor(fname)
1414
or vim.fn.getcwd()
1515
end,

0 commit comments

Comments
 (0)