Class: SorbetView::CLI::Runner
- Inherits:
-
Object
- Object
- SorbetView::CLI::Runner
- Extended by:
- T::Sig
- Defined in:
- lib/sorbet_view/cli/runner.rb
Constant Summary collapse
- COMMANDS =
T.let({ 'tc' => 'Compile templates and run srb tc', 'compile' => 'Compile templates to Ruby files', 'lsp' => 'Start LSP proxy server', 'clean' => 'Remove generated files', 'init' => 'Generate .sorbet_view.yml config file' }.freeze, T::Hash[String, String])
Class Method Summary collapse
Class Method Details
.start(argv) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/sorbet_view/cli/runner.rb', line 18 def self.start(argv) command = argv[0] args = argv[1..] || [] case command when 'tc' run_tc(args) when 'compile' run_compile(args) when 'lsp' run_lsp(args) when 'clean' run_clean(args) when 'init' run_init else print_usage end end |