Class: Suma::Cli::Build

Inherits:
Thor
  • Object
show all
Defined in:
lib/suma/cli/build.rb

Overview

Build command for building collections

Instance Method Summary collapse

Instance Method Details

#build(metanorma_site_manifest) ⇒ Object



17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/suma/cli/build.rb', line 17

def build(metanorma_site_manifest)
  # Lazy-load dependencies only when this command is actually used
  require_relative "../processor"
  require_relative "../utils"

  unless File.exist?(metanorma_site_manifest)
    raise Errno::ENOENT, "Specified Metanorma site manifest file " \
                         "`#{metanorma_site_manifest}` not found."
  end

  # Allow errors to propagate
  run(metanorma_site_manifest, options)
end