Class: Suma::Processor

Inherits:
Object
  • Object
show all
Defined in:
lib/suma/processor.rb

Class Method Summary collapse

Class Method Details

.run(metanorma_yaml_path:, schemas_all_path:, compile:, output_directory: "_site") ⇒ Object



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

def run(metanorma_yaml_path:, schemas_all_path:, compile:, output_directory: "_site")
  Utils.log "Current directory: #{Dir.getwd}, writing #{schemas_all_path}..."
  collection_config = export_schema_config(metanorma_yaml_path, schemas_all_path)

  unless compile
    Utils.log "No compile option set. Skipping schema compilation."
    nil
  end

  Utils.log "Compiling schema collection..."
  compile_schema(schemas_all_path, collection_config)

  Utils.log "Compiling complete collection..."
  compile_collection(collection_config, output_directory)
end