t-ruby 0.0.34 → 0.0.35
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.
- checksums.yaml +4 -4
- data/README.md +66 -5
- data/lib/t_ruby/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5e0ef66816ac48ae4a0e21326270f31e44bf258bd12f28bc1e2822ef2f087e89
|
|
4
|
+
data.tar.gz: 3a16ea18d0a0aabc2b5add683642c5ef346343b8b988fb0b02d9942e1f95842f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b2d1d004b7d7eac3a62c7a12487b9175d53bd688f47baec72d5f23c405a79943c4f33049e60cdfbb32924f530a8e88b4895c7738978754590d4e4898e34ffae9
|
|
7
|
+
data.tar.gz: 5079f36e6bff492eca9fb6aaff1ffa56379b42dc03d09dfc413236888adb6797ac791aa1839fd9ebf3b891f319333696d0af71966076a78088f8e900ee3668f7
|
data/README.md
CHANGED
|
@@ -152,10 +152,21 @@ trc --version
|
|
|
152
152
|
|
|
153
153
|
## Quick start
|
|
154
154
|
|
|
155
|
-
### 1.
|
|
155
|
+
### 1. Initialize project
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
trc --init
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
This creates:
|
|
162
|
+
- `trbconfig.yml` — project configuration
|
|
163
|
+
- `src/` — source directory
|
|
164
|
+
- `build/` — output directory
|
|
165
|
+
|
|
166
|
+
### 2. Write `.trb`
|
|
156
167
|
|
|
157
168
|
```trb
|
|
158
|
-
# hello.trb
|
|
169
|
+
# src/hello.trb
|
|
159
170
|
def greet(name: String): String
|
|
160
171
|
"Hello, #{name}!"
|
|
161
172
|
end
|
|
@@ -163,19 +174,69 @@ end
|
|
|
163
174
|
puts greet("world")
|
|
164
175
|
```
|
|
165
176
|
|
|
166
|
-
###
|
|
177
|
+
### 3. Compile
|
|
167
178
|
|
|
168
179
|
```bash
|
|
169
|
-
trc hello.trb
|
|
180
|
+
trc src/hello.trb
|
|
170
181
|
```
|
|
171
182
|
|
|
172
|
-
###
|
|
183
|
+
### 4. Run
|
|
173
184
|
|
|
174
185
|
```bash
|
|
175
186
|
ruby build/hello.rb
|
|
176
187
|
# => Hello, world!
|
|
177
188
|
```
|
|
178
189
|
|
|
190
|
+
### 5. Watch mode
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
trc -w # Watch directories from trbconfig.yml (default: src/)
|
|
194
|
+
trc -w lib/ # Watch specific directory
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
Files are automatically recompiled on change.
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## Configuration
|
|
202
|
+
|
|
203
|
+
`trc --init` generates a `trbconfig.yml` file with all available options:
|
|
204
|
+
|
|
205
|
+
```yaml
|
|
206
|
+
# T-Ruby configuration file
|
|
207
|
+
# See: https://type-ruby.github.io/docs/getting-started/project-configuration
|
|
208
|
+
|
|
209
|
+
source:
|
|
210
|
+
include:
|
|
211
|
+
- src
|
|
212
|
+
exclude: []
|
|
213
|
+
extensions:
|
|
214
|
+
- ".trb"
|
|
215
|
+
- ".rb"
|
|
216
|
+
|
|
217
|
+
output:
|
|
218
|
+
ruby_dir: build
|
|
219
|
+
# rbs_dir: sig # Optional: separate directory for .rbs files
|
|
220
|
+
preserve_structure: true
|
|
221
|
+
# clean_before_build: false
|
|
222
|
+
|
|
223
|
+
compiler:
|
|
224
|
+
strictness: standard # strict | standard | permissive
|
|
225
|
+
generate_rbs: true
|
|
226
|
+
target_ruby: "3.0"
|
|
227
|
+
# experimental: []
|
|
228
|
+
# checks:
|
|
229
|
+
# no_implicit_any: false
|
|
230
|
+
# no_unused_vars: false
|
|
231
|
+
# strict_nil: false
|
|
232
|
+
|
|
233
|
+
watch:
|
|
234
|
+
# paths: [] # Additional paths to watch
|
|
235
|
+
debounce: 100
|
|
236
|
+
# clear_screen: false
|
|
237
|
+
# on_success: "bundle exec rspec"
|
|
238
|
+
```
|
|
239
|
+
|
|
179
240
|
---
|
|
180
241
|
|
|
181
242
|
## Features
|
data/lib/t_ruby/version.rb
CHANGED