Class: Ruwi::Cli::Command::Pack

Inherits:
Base
  • Object
show all
Defined in:
lib/ruwi/cli/command/pack.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.descriptionObject



9
10
11
# File 'lib/ruwi/cli/command/pack.rb', line 9

def self.description
  "Pack WASM file by packing Ruby source files"
end

Instance Method Details

#run(_argv) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/ruwi/cli/command/pack.rb', line 13

def run(_argv)
  log_info("Packing WASM file...")
  puts ""

  ensure_src_directory
  ensure_ruby_wasm
  ensure_dist_directory

  # Pack WASM file
  pack

  # Copy non-Ruby files from src to dist
  copy_non_ruby_files
end