Class: Ea::Cli::Command::Spa

Inherits:
Base
  • Object
show all
Defined in:
lib/ea/cli/command/spa.rb

Overview

ea spa FILE [--output=PATH] [--mode=MODE]

Generates a static single-page application (SPA) from a QEA or XMI file using the Ea::Model native pipeline:

1. Source parse (Ea::Qea::Database / Xmi::Sparx::Root)
2. Source adapter → Ea::Model::Document
3. Ea::Spa::Projector → skeleton + shards + search index
4. Ea::Spa::Output::Strategy → HTML/JSON on disk

Constant Summary collapse

DEFAULT_MODE =
:single_file

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Ea::Cli::Command::Base

Instance Method Details

#callObject



18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/ea/cli/command/spa.rb', line 18

def call
  document = build_model_document
  output_path = resolve_output_path
  Ea::Spa::Generator.new(
    document,
    output: output_path,
    mode: mode,
    configuration: spa_configuration
  ).generate

  formatter.render([[output_path]], columns: [:written_to])
end