Commit 3dbbbdd
authored
Ruby CLI: Expose Node.js binaries in Herb Ruby CLI (#1192)
```diff
Commands:
bundle exec herb lex [file] Lex a file.
bundle exec herb parse [file] Parse a file.
bundle exec herb compile [file] Compile ERB template to Ruby code.
bundle exec herb render [file] Compile and render ERB template to final output.
bundle exec herb analyze [path] Analyze a project by passing a directory to the root of the project
bundle exec herb config [path] Show configuration and file patterns for a project
bundle exec herb ruby [file] Extract Ruby from a file.
bundle exec herb html [file] Extract HTML from a file.
bundle exec herb playground [file] Open the content of the source file in the playground
bundle exec herb version Prints the versions of the Herb gem and the libherb library.
+ bundle exec herb lint [patterns] Lint templates (delegates to @herb-tools/linter)
+ bundle exec herb format [patterns] Format templates (delegates to @herb-tools/formatter)
+ bundle exec herb highlight [file] Syntax highlight templates (delegates to @herb-tools/highlighter)
+ bundle exec herb print [file] Print AST (delegates to @herb-tools/printer)
+ bundle exec herb lsp Start the language server (delegates to @herb-tools/language-server)
```
**`bundle exec herb lint examples/if_else.html.erb`**
```
Node.js: v22.13.0
Running: /Users/marcoroth/Development/herb-release-0.8.9/node_modules/.bin/herb-lint examples/if_else.html.erb
✓ examples/if_else.html.erb - No issues found
Summary:
Checked 1 file
Offenses 0 offenses
Start at 17:48:14
Duration 79ms (51 rules)
```
Related #4751 parent 324b1f5 commit 3dbbbdd
1 file changed
Lines changed: 75 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
109 | 114 | | |
110 | 115 | | |
111 | 116 | | |
| |||
171 | 176 | | |
172 | 177 | | |
173 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
174 | 189 | | |
175 | 190 | | |
176 | 191 | | |
| |||
253 | 268 | | |
254 | 269 | | |
255 | 270 | | |
| 271 | + | |
| 272 | + | |
256 | 273 | | |
257 | 274 | | |
258 | 275 | | |
259 | 276 | | |
260 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
261 | 325 | | |
262 | 326 | | |
263 | 327 | | |
| |||
0 commit comments